Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion upload/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def try_to_get_best_possible_bot_token(
try:
github_token = get_github_integration_token(
repository.author.service,
installation_id=ghapp_installation_id,
integration_id=ghapp_installation_id,
)
return dict(key=github_token)
except InvalidInstallationError:
Expand Down
8 changes: 2 additions & 6 deletions upload/tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ def test_try_to_get_best_possible_bot_token_using_integration(
assert try_to_get_best_possible_bot_token(repository) == {
"key": "test-token",
}
get_github_integration_token.assert_called_once_with(
"github", installation_id=12345
)
get_github_integration_token.assert_called_once_with("github", integration_id=12345)


@patch("upload.helpers.get_github_integration_token")
Expand All @@ -125,9 +123,7 @@ def test_try_to_get_best_possible_bot_token_using_invalid_integration(
"key": "bornana",
"secret": None,
}
get_github_integration_token.assert_called_once_with(
"github", installation_id=12345
)
get_github_integration_token.assert_called_once_with("github", integration_id=12345)


def test_try_to_get_best_possible_nothing_and_is_private(db):
Expand Down
Loading