File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
src/sentry/seer/code_review Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 35603560 "external_id": "4663713",
35613561 "html_url": "https://github.com/test/repo/runs/4"
35623562 },
3563- "user ": {
3563+ "sender ": {
35643564 "id": 12345678,
35653565 "login": "test-user"
35663566 }
35743574 "full_name": "getsentry/sentry",
35753575 "html_url": "https://github.com/getsentry/sentry"
35763576 },
3577- "user ": {
3577+ "sender ": {
35783578 "id": 12345678,
35793579 "login": "test-user"
35803580 }
Original file line number Diff line number Diff line change 99from sentry .models .repository import Repository
1010from sentry .models .repositorysettings import CodeReviewSettings , RepositorySettings
1111
12- from .billing import passes_code_review_billing_check
13-
1412DenialReason = str | None
1513
1614
@@ -91,6 +89,10 @@ def _check_repo_feature_enablement(self) -> DenialReason:
9189 return "repo_code_review_disabled"
9290
9391 def _check_billing (self ) -> DenialReason :
92+ return None
93+
94+ # TODO: Once we're ready to actually gate billing (when it's time for GA), uncomment this
95+ """
9496 if self.integration_id is None or self.pr_author_external_id is None:
9597 return "billing_missing_contributor_info"
9698
@@ -103,6 +105,7 @@ def _check_billing(self) -> DenialReason:
103105 return "billing_quota_exceeded"
104106
105107 return None
108+ """
106109
107110 # -------------------------------------------------------------------------
108111 # Org type helpers
Original file line number Diff line number Diff line change @@ -220,4 +220,8 @@ def get_pr_author_id(event: Mapping[str, Any]) -> str | None:
220220 if (user_id := event .get ("user" , {}).get ("id" )) is not None :
221221 return str (user_id )
222222
223+ # Check sender.id (for check_run events). Sender is the user who triggered the event
224+ if (user_id := event .get ("sender" , {}).get ("id" )) is not None :
225+ return str (user_id )
226+
223227 return None
You can’t perform that action at this time.
0 commit comments