Skip to content

Ensure that we can match webhook requests to exactly one external service

Created by: mrnugget

In our GitHub and Bitbucket Server webhook handlers we cannot reliably match a webhook request deterministically to a single external service:

https://github.com/sourcegraph/sourcegraph/blob/b56550a2b38de7e03711b40c71501e6e9791f9d2/enterprise/internal/campaigns/webhooks.go#L833-L840

In order to solve this, we need to either parse the webhook payload in a way that allows us to get to the URL of the external service (which is the ExternalServiceID of a repo), or another way.

  • Add externalServiceID param for GitHub and Bitbucket
  • Display target URL in admin area
  • Update docs to mention exteralServiceID param when setting up manually

See Slack here: https://sourcegraph.slack.com/archives/CMMTWQQ49/p1587747166228600