Skip to content

Commit 8aee8b0

Browse files
authored
Fixes gh authentication for autorevert (#7008)
API changes made authentication with GHA key use a different parameter name for function call.
1 parent bcf8d77 commit 8aee8b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aws/lambda/pytorch-auto-revert/pytorch_auto_revert/github_client_helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ def key_auth_provided(self) -> bool:
7575
@property
7676
def client(self) -> github.Github:
7777
if "client" not in self._data:
78-
if self.token_auth_provided and not self.key_auth_provided:
78+
if self.token_auth_provided:
7979
auth = github.Auth.Token(self._token)
80-
elif self.key_auth_provided and not self.token_auth_provided:
80+
elif self.key_auth_provided:
8181
auth = github.Auth.AppInstallationAuth(
8282
github.Auth.AppAuth(
8383
app_id=self._app_id,
84-
app_secret=self._app_secret,
84+
private_key=self._app_secret,
8585
),
8686
installation_id=self._installation_id,
8787
)

0 commit comments

Comments
 (0)