Skip to content

a8n: Handle GitHub commit status webhooks

Administrator requested to merge a8n/comitstatus-webhook into master

Created by: ryanslade

This ended up being quite a bit more work than expected since incoming commit status webhooks are not attached to a PR (https://developer.github.com/v3/activity/events/types/#statusevent). Instead, all we know is the branch they affect. Due to this we need to look up all changesets that could be affected by finding their HeadRef. We then compute the overall state by combining the latest state for each commit context in our last synced commit with any events have arrived after that.

One extra complication is that not only could we receive a new commit status we could receive a completely new commit via webhooks.

Related issue: https://github.com/sourcegraph/sourcegraph/issues/7093

Merge request reports

Loading