Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit e4ddcc2

Browse files
committed
Correct kwarg for get_github_integration_token
I removed a fn which has only directly forwarded calls to the other fn in shared, but renamed one of the kwargs, which I missed. This now renames the kwarg properly.
1 parent e6e0551 commit e4ddcc2

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

upload/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def try_to_get_best_possible_bot_token(
387387
try:
388388
github_token = get_github_integration_token(
389389
repository.author.service,
390-
installation_id=ghapp_installation_id,
390+
integration_id=ghapp_installation_id,
391391
)
392392
return dict(key=github_token)
393393
except InvalidInstallationError:

upload/tests/test_helpers.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ def test_try_to_get_best_possible_bot_token_using_integration(
9999
assert try_to_get_best_possible_bot_token(repository) == {
100100
"key": "test-token",
101101
}
102-
get_github_integration_token.assert_called_once_with(
103-
"github", installation_id=12345
104-
)
102+
get_github_integration_token.assert_called_once_with("github", integration_id=12345)
105103

106104

107105
@patch("upload.helpers.get_github_integration_token")
@@ -125,9 +123,7 @@ def test_try_to_get_best_possible_bot_token_using_invalid_integration(
125123
"key": "bornana",
126124
"secret": None,
127125
}
128-
get_github_integration_token.assert_called_once_with(
129-
"github", installation_id=12345
130-
)
126+
get_github_integration_token.assert_called_once_with("github", integration_id=12345)
131127

132128

133129
def test_try_to_get_best_possible_nothing_and_is_private(db):

0 commit comments

Comments
 (0)