It appears we've hit another race condition in the github api.
We re-fetch the PR when processing the webhook in order to fetch all
reviewers/assignees, since the PR object received in the webhook
request body is not complete.
When we fetch the PR in the webhook, we are getting back an old
head.sha value, not the value of the current push in question.
Update to use the commit hash instead when creating the check-run.
This seems slightly more correct anyway, since these commits are
the ones we're checking for jira references, it makes sense that
these commits are the ones we should apply the check-run to.
It appears we've hit another race condition in the github api. We re-fetch the PR when processing the webhook in order to fetch all reviewers/assignees, since the PR object received in the webhook request body is not complete.
When we fetch the PR in the webhook, we are getting back an old
head.sha
value, not the value of the current push in question.Update to use the commit hash instead when creating the check-run. This seems slightly more correct anyway, since these commits are the ones we're checking for jira references, it makes sense that these commits are the ones we should apply the check-run to.