Skip to content

Ignore GitHub installation webhooks with a null account - #1887

Open
thomasrockhu-codecov wants to merge 4 commits into
mainfrom
th/ignore-installation-webhook-null-account
Open

Ignore GitHub installation webhooks with a null account#1887
thomasrockhu-codecov wants to merge 4 commits into
mainfrom
th/ignore-installation-webhook-null-account

Conversation

@thomasrockhu-codecov

Copy link
Copy Markdown
Contributor

Summary

  • Return HTTP 200 when an installation / installation_repositories webhook has a missing or null installation.account, instead of crashing with TypeError (Sentry 7572921070).
  • Log delivery, target_id (X-GitHub-Hook-Installation-Target-ID), app_id, installation_id, and action so we can identify the sending GitHub App after deploy.
  • This stops feeding automated redelivery loops that retry failed deliveries for ~24 hours.

Test plan

  • Unit tests for null account and missing account on both installation and installation_repositories
  • After deploy: confirm Sentry issue volume drops
  • After deploy: query Cloud Logging for Ignoring installation webhook with missing account and note target_id values

Made with Cursor

thomasrockhu-codecov and others added 3 commits August 1, 2026 21:40
Returning 500 on these payloads feeds third-party redelivery loops; acknowledge them with a 200 and log the sending app id so we can identify the source.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@thomasrockhu-codecov

Copy link
Copy Markdown
Contributor Author

APITestCase is unittest-style, so pytest cannot inject the `mocker`
fixture as a test method argument.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov-notifications

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants