Skip to content

Commit

Permalink
Merge pull request #88 from ohenak/fix/ghe-get-401-error
Browse files Browse the repository at this point in the history
[Chore] Provide token when getting 401 error
  • Loading branch information
vsoch authored Sep 22, 2022
2 parents e64deeb + 6672934 commit 4155448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pull-request.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def find_default_branch():
response = requests.get(REPO_URL)

# Case 1: 404 might need a token
if response.status_code == 404:
if response.status_code in [401, 404]:
response = requests.get(REPO_URL, headers=HEADERS)
if response.status_code != 200:
abort_if_fail(response, "Unable to retrieve default branch")
Expand Down

0 comments on commit 4155448

Please sign in to comment.