Home / Companies / Mergify / Blog / Post Details
Content Deep Dive

When GitHub Webhooks Lie: How an Empty Array Broke Our Merge Queue

Blog post from Mergify

Post Details
Company
Date Published
Author
-
Word Count
1,367
Company Posts That Month
7
Language
English
Hacker News Points
-
Post removed?
No
Summary

GitHub webhooks can sometimes deliver payloads with stale data, leading to issues such as the unexpected ejection of pull requests from merge queues, as experienced by a team that traced the problem to out-of-order webhook delivery. The incident involved a structurally valid webhook payload with an empty labels array, despite the pull request having all necessary labels, illustrating how out-of-order delivery and incomplete payloads can corrupt database states when webhooks are treated as the authoritative source. The team identified that the webhook's action field should be used to determine which fields to trust, rather than assuming every field in every event is both authoritative and current. To address this, they implemented an action-aware update mechanism, ensuring that labels are only overwritten when the webhook action pertains to label changes, thus preserving existing labels in the database. This targeted fix, which was integrated into the model layer for broader applicability, underscores the importance of recognizing patterns of incomplete payloads and designing resilience into webhook processing systems.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 1 13,979 3,441 296 +113%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.