A webhook delivery can fail for multiple reasons. For example, if your server is down or takes longer than 30 seconds to respond, GitHub will record the delivery as a failure.
GitHub does not automatically redeliver failed deliveries.
You can manually redeliver failed deliveries. For more information, see "Redelivering webhooks."
You can also write a script that checks for failed deliveries and attempts to redeliver any that failed. Your script should run on a schedule and do the following:
Use the GitHub REST API to fetch data about any webhook deliveries that were attempted since the last time that your script ran. For more information, see "Repository webhooks," "Organization webhooks," and "GitHub App webhooks."
There are no API endpoints to get data about global webhook deliveries.
Look at the fetched data to see if any deliveries failed. The data for a failed delivery will have a
statusvalue that is not
For example scripts, see:
- "Automatically redelivering failed deliveries for a repository webhook"
- "Automatically redelivering failed deliveries for an organization webhook"
- "Automatically redelivering failed deliveries for a GitHub App webhook"
If a webhook delivery fails repeatedly, you should investigate the cause. Each failed delivery will give a reason for failure. For more information, see "Troubleshooting webhooks."