Skip to content

Commit 0685669

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

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
@@ -3665,14 +3665,6 @@
36653665
flags=FLAG_ALLOW_EMPTY | FLAG_AUTOMATOR_MODIFIABLE,
36663666
)
36673667

3668-
# Enables or disables Github webhook routing based on the type of webhook
3669-
register(
3670-
"github.webhook-type-routing.enabled",
3671-
type=Bool,
3672-
default=False,
3673-
flags=FLAG_AUTOMATOR_MODIFIABLE,
3674-
)
3675-
36763668
# Sets the sample rate for profiles collected via the JoinProfiler arroyo strategy
36773669
register(
36783670
"consumer.join.profiling.rate",

0 commit comments

Comments
 (0)