Skip to content

Commit 8a6c135

Browse files
committed
fix typing
1 parent 594f034 commit 8a6c135

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sentry/integrations/bitbucket/webhook.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ class PushEventWebhook(BitbucketWebhook):
9696
def event_type(self) -> IntegrationWebhookEventType:
9797
return IntegrationWebhookEventType.PUSH
9898

99-
def __call__(self, request: HttpRequest, event: Mapping[str, Any], **kwargs) -> None:
99+
def __call__(self, event: Mapping[str, Any], **kwargs) -> None:
100100
authors = {}
101+
if not (request := kwargs.get("request")):
102+
raise ValueError("Missing request")
101103

102104
if not (organization := kwargs.get("organization")):
103105
raise ValueError("Missing organization")
@@ -245,7 +247,7 @@ def post(self, request: HttpRequest, organization_id: int) -> HttpResponse:
245247
provider_key=event_handler.provider,
246248
).capture():
247249
try:
248-
event_handler(request, event, organization=organization)
250+
event_handler(event, request=request, organization=organization)
249251
except WebhookSignatureException as e:
250252
return HttpResponse(str(e), status=400)
251253

0 commit comments

Comments
 (0)