Skip to content

Commit 968f11f

Browse files
authored
fix call to user service record_event in github token disclosure integration (#10771)
introduced in #10707 resolves https://sentry.io/share/issue/bd36f5a3cca74563af91fb53b586dae7/
1 parent ae6423e commit 968f11f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

tests/unit/integration/github/test_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ def metrics_increment(key):
559559

560560
find = pretend.call_recorder(lambda *a, **kw: database_macaroon)
561561
delete = pretend.call_recorder(lambda *a, **kw: None)
562-
record_event = pretend.call_recorder(lambda *a, **kw: None)
562+
record_event = pretend.call_recorder(lambda user_id, *, tag, additional=None: None)
563563
svc = {
564564
utils.IMetricsService: pretend.stub(increment=metrics_increment),
565565
utils.IMacaroonService: pretend.stub(
@@ -596,7 +596,6 @@ def metrics_increment(key):
596596
pretend.call(
597597
user_id,
598598
tag="account:api_token:removed_leak",
599-
ip_address="127.0.0.1",
600599
additional={
601600
"macaroon_id": "12",
602601
"public_url": "http://example.com",

warehouse/integrations/github/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ def _analyze_disclosure(request, disclosure_record, origin):
248248
user_service.record_event(
249249
database_macaroon.user.id,
250250
tag="account:api_token:removed_leak",
251-
ip_address="127.0.0.1",
252251
additional={
253252
"macaroon_id": str(database_macaroon.id),
254253
"public_url": disclosure.public_url,

0 commit comments

Comments
 (0)