Deploy notification payload missing commit_ref

Hi,

When I use a custom HTTP POST notification for a deploy preview, I get a payload with fields like this:

{
    "state": "ready",
    "commit_ref": null,
    "review_id": 123,
    "branch": "examplebranch",
    "commit_url": null,
    "commit_message": "example commit message",
    "review_url": "https://github.com/owner/repo/pull/123"
}

Crucially the commit_ref is empty. Is there a reason this field is present but not populated? This example was probably after hitting “retry with latest branch commit.”

I could interrogate the GitHub API using the branch name, but there’s no guarantee I’ll get the same reference as was built by Netlify.

Hi, @cmbuckley. My best guess without the deploy id is that the deploy was triggered via API call or a button in the UI and not triggered via a commit to the Git repo. If that is how the deploy was triggered (via API or button in the UI), it is expected that the commit_ref will not have a value.

If you share the deploy id for the notification in question, we can double-check this to confirm if that is the explanation or not.