Skip to content

Commit 5d97844

Browse files
committed
fix: sanitize GH App ID to catch weird nested quotes
1 parent 2c1f889 commit 5d97844

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gh_org_mgr/_gh_org.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ def login(
8383

8484
# Decide how to login. If app set, prefer this
8585
if self.gh_app_id and self.gh_app_private_key:
86-
logging.debug("Logging in via app %s", self.gh_app_id)
87-
auth = Auth.AppAuth(app_id=self.gh_app_id, private_key=self.gh_app_private_key)
86+
gh_app_id_sanitized = str(self.gh_app_id).strip("'").strip('"')
87+
logging.debug("Logging in via app %s", gh_app_id_sanitized)
88+
auth = Auth.AppAuth(app_id=gh_app_id_sanitized, private_key=self.gh_app_private_key)
8889
app = GithubIntegration(auth=auth)
8990
try:
9091
installation = app.get_org_installation(org=orgname)

0 commit comments

Comments
 (0)