sentry icon indicating copy to clipboard operation
sentry copied to clipboard

DRAFT feat: Add webhook guard for determining when to update/add org contribs

Open ajay-sentry opened this issue 1 month ago • 2 comments

Creates a helper function that gets instrumented in the webhook handler after we create a pull request, adding a couple RPCs to fetch seer enabled information as well as repo and setting information (lives in 4 different places). Might also need to add seer add-on enabled billing check potentially if that's a separate thing as well.

Also adds another metric so we can see how often we're entering the condition (and if at all)

Closes https://linear.app/getsentry/issue/ENG-5931/create-guard-for-webhook-logic

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

ajay-sentry avatar Dec 04 '25 01:12 ajay-sentry

Codecov Report

:x: Patch coverage is 96.77419% with 1 line in your changes missing coverage. Please review. :white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/integrations/github/webhook.py 80.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #104371      +/-   ##
===========================================
+ Coverage   79.84%    80.60%   +0.75%     
===========================================
  Files        9369      9359      -10     
  Lines      402194    401719     -475     
  Branches    25835     25597     -238     
===========================================
+ Hits       321145    323790    +2645     
+ Misses      80601     77476    -3125     
- Partials      448       453       +5     

codecov[bot] avatar Dec 04 '25 02:12 codecov[bot]