-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Description
We are on Github Enterprise 3.3, when the find_default_branch is invoked,
It gets the following error:
Unable to retrieve default branch: 401: Unauthorized
[26](https://github.braintreeps.com/venmo/mobile-release-ios/runs/6575890?check_suite_focus=true#step:5:26)
{'message': 'Must authenticate to access this API.', 'documentation_url': 'https://docs.github.com/enterprise/3.3/rest'}
It is because the initial Get request does not incorporate the token.
https://github.com/vsoch/pull-request-action/blob/master/pull-request.py#L239-L243
response = requests.get(REPO_URL)
# Case 1: 404 might need a token
if response.status_code == 404:
response = requests.get(REPO_URL, headers=HEADERS)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels