Skip to content

Handle double-delivery of Bitbucket Server webhooks

Administrator requested to merge bbs-webhook-fix into master

Created by: mrnugget

When we receive a webhook for the same event twice the Webhook.upsertChangesetEvent method will find an existing ChangesetEvent in the database and try to call existing.Update(newEvent).

The switch statement in Update was not exhaustive and lead to panics when trying out the Bitbucket Server webhooks:

https://github.com/sourcegraph/customer/issues/13#issuecomment-594482215

Merge request reports

Loading