-
Notifications
You must be signed in to change notification settings - Fork 62
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)
Metadata
Metadata
Assignees
Labels
No labels