Webhook Deduplication
GitAuto deduplicates incoming webhook events by inserting a unique record into the database for each event. Duplicate webhooks - the same event delivered twice by GitHub - are caught by the database unique constraint and discarded.
Why This Exists
GitHub occasionally delivers the same webhook event multiple times due to network retries, timeouts, or internal queueing issues. Without deduplication, the same fix attempt runs multiple times in parallel, creating duplicate commits, conflicting branches, or wasted Lambda invocations that all do the same work.
How It Works
Each incoming webhook includes a unique delivery ID from GitHub. GitAuto attempts to insert this ID into a database table with a unique constraint. If the insert succeeds, the webhook is new and processing continues. If the insert fails due to a uniqueness violation, the webhook is a duplicate and is immediately discarded. This check happens before any expensive operations like cloning repositories or calling the LLM API.
Related Features
- Race Condition Prevention - deduplicates at the check-suite level for a different type of duplicate
- Bot Loop Prevention - prevents duplicate responses in review threads
Need Help?
Have questions or suggestions? We're here to help you get the most out of GitAuto.
Contact us with your questions or feedback!