Skip to main content

Cette version de GitHub Enterprise Server n'est plus disponible depuis le 2024-09-25. Aucune publication de correctifs n’est effectuée, même pour les problèmes de sécurité critiques. Pour de meilleures performances, une sécurité améliorée et de nouvelles fonctionnalités, effectuez une mise à niveau vers la dernière version de GitHub Enterprise. Pour obtenir de l’aide sur la mise à niveau, contactez le support GitHub Enterprise.

Gestion des échecs de livraison de webhook

GitHub ne relivre pas automatiquement les livraisons de webhook ayant échoué, mais vous pouvez gérer les échecs de livraison manuellement ou en écrivant du code.

About webhook delivery failures

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.

Handling delivery failures

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:

  1. 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 REST API endpoints for repository webhooks, REST API endpoints for organization webhooks, and REST API endpoints for GitHub App webhooks.

    There are no API endpoints to get data about global webhook deliveries.

  2. Look at the fetched data to see if any deliveries failed. The data for a failed delivery will have a status value that is not OK.

  3. Use the GitHub REST API to redeliver any deliveries that failed. For more information, see REST API endpoints for repository webhooks, REST API endpoints for organization webhooks, and REST API endpoints for GitHub App webhooks.

For example scripts, see:

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.