Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/sentry/middleware/integrations/parsers/github_enterprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
from collections.abc import Mapping
from typing import Any

from django.http import HttpRequest

from sentry.hybridcloud.outbox.category import WebhookProviderIdentifier
from sentry.integrations.github.webhook import get_github_external_id
from sentry.integrations.github.webhook_types import GITHUB_WEBHOOK_TYPE_HEADER, GithubWebhookType
from sentry.integrations.github_enterprise.webhook import GitHubEnterpriseWebhookEndpoint, get_host
from sentry.integrations.types import IntegrationProviderSlug
from sentry.middleware.integrations.parsers.github import GithubRequestParser
Expand All @@ -21,13 +18,6 @@ class GithubEnterpriseRequestParser(GithubRequestParser):
webhook_identifier = WebhookProviderIdentifier.GITHUB_ENTERPRISE
webhook_endpoint = GitHubEnterpriseWebhookEndpoint

def should_route_to_control_silo(
self, parsed_event: Mapping[str, Any], request: HttpRequest
) -> bool:
# GHE only routes installation events to control silo.
# installation_repositories is not yet supported for GHE.
return request.META.get(GITHUB_WEBHOOK_TYPE_HEADER) == GithubWebhookType.INSTALLATION

def _get_external_id(self, event: Mapping[str, Any]) -> str | None:
host = get_host(request=self.request)
if not host:
Comment thread
wedamija marked this conversation as resolved.
Expand Down
Loading