Skip to content

Commit e3040bc

Browse files
chore(eco): Cleans up old flag, old logic for Github webhook routing
1 parent 03869d7 commit e3040bc

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

src/sentry/middleware/integrations/parsers/github.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,7 @@ def _get_external_id(self, event: Mapping[str, Any]) -> str | None:
3838
def should_route_to_control_silo(
3939
self, parsed_event: Mapping[str, Any], request: HttpRequest
4040
) -> bool:
41-
if options.get("github.webhook-type-routing.enabled"):
42-
return request.META.get(GITHUB_WEBHOOK_TYPE_HEADER) == GithubWebhookType.INSTALLATION
43-
44-
return bool(
45-
parsed_event.get("installation")
46-
and not parsed_event.get("issue")
47-
and parsed_event.get("action") in {"created", "deleted"}
48-
)
41+
return request.META.get(GITHUB_WEBHOOK_TYPE_HEADER) == GithubWebhookType.INSTALLATION
4942

5043
@control_silo_function
5144
def get_integration_from_request(self) -> Integration | None:

src/sentry/options/defaults.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3649,14 +3649,6 @@
36493649
flags=FLAG_ALLOW_EMPTY | FLAG_AUTOMATOR_MODIFIABLE,
36503650
)
36513651

3652-
# Enables or disables Github webhook routing based on the type of webhook
3653-
register(
3654-
"github.webhook-type-routing.enabled",
3655-
type=Bool,
3656-
default=False,
3657-
flags=FLAG_AUTOMATOR_MODIFIABLE,
3658-
)
3659-
36603652
# Sets the sample rate for profiles collected via the JoinProfiler arroyo strategy
36613653
register(
36623654
"consumer.join.profiling.rate",

0 commit comments

Comments
 (0)