Skip to content
Discussion options

You must be logged in to vote

When working with GitHub webhooks, it’s totally normal to encounter retries because GitHub will resend events if it doesn’t receive a successful response from your server within a certain timeframe. To handle duplicate events gracefully, the most common approach is to use the unique X-GitHub-Delivery header that GitHub includes with every webhook payload. By storing these delivery IDs in your database or cache, you can check incoming requests against them and ignore any duplicates that you’ve already processed. This way, even if GitHub retries sending the same event, your system won’t act on it twice. Additionally, make sure your webhook endpoint responds quickly with a 200 OK status as s…

Replies: 1 comment

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions related to GitHub's APIs or Webhooks Question Ask and answer questions about GitHub features and usage
2 participants