tanium / octobot

github bot with slack and jira integration
MIT License
25 stars 16 forks source link

Fix race condition applying jira check suite #315

Closed matthauck closed 2 years ago

matthauck commented 2 years ago

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.

matthauck commented 2 years ago

yeah, not sure why these lint things are coming up now... 🤔

maybe rust version update?