Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d703f40f3a |
@@ -14,6 +14,7 @@ represented by the pull requests that fixed them. Critical items to know are:
|
|||||||
Versions correspond with GitHub releases that can be referenced with @ using actions.
|
Versions correspond with GitHub releases that can be referenced with @ using actions.
|
||||||
|
|
||||||
## [master](https://github.com/vsoch/pull-request-action/tree/master) (master)
|
## [master](https://github.com/vsoch/pull-request-action/tree/master) (master)
|
||||||
|
- bugfix of token handling if 401 error received (missing 401 case) (1.0.21)
|
||||||
- bugfix of writing to environment file (missing newline) (1.0.19)
|
- bugfix of writing to environment file (missing newline) (1.0.19)
|
||||||
- bugfix of missing from branch with scheduled run (1.0.16)
|
- bugfix of missing from branch with scheduled run (1.0.16)
|
||||||
- forgot to add assignees (1.0.15)
|
- forgot to add assignees (1.0.15)
|
||||||
|
|||||||
@@ -180,8 +180,8 @@ def list_pull_requests(target, source):
|
|||||||
print("Params for checking if pull request exists: %s" % params)
|
print("Params for checking if pull request exists: %s" % params)
|
||||||
response = requests.get(PULLS_URL, params=params)
|
response = requests.get(PULLS_URL, params=params)
|
||||||
|
|
||||||
# Case 1: 404 might warrant needing a token
|
# Case 1: 401, 404 might warrant needing a token
|
||||||
if response.status_code == 404:
|
if response.status_code in [401, 404]:
|
||||||
response = requests.get(PULLS_URL, params=params, headers=HEADERS)
|
response = requests.get(PULLS_URL, params=params, headers=HEADERS)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
abort_if_fail(response, "Unable to retrieve information about pull requests")
|
abort_if_fail(response, "Unable to retrieve information about pull requests")
|
||||||
@@ -238,7 +238,7 @@ def find_default_branch():
|
|||||||
"""Find default branch for a repo (only called if branch not provided)"""
|
"""Find default branch for a repo (only called if branch not provided)"""
|
||||||
response = requests.get(REPO_URL)
|
response = requests.get(REPO_URL)
|
||||||
|
|
||||||
# Case 1: 404 might need a token
|
# Case 1: 401, 404 might need a token
|
||||||
if response.status_code in [401, 404]:
|
if response.status_code in [401, 404]:
|
||||||
response = requests.get(REPO_URL, headers=HEADERS)
|
response = requests.get(REPO_URL, headers=HEADERS)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
|
|||||||
Reference in New Issue
Block a user