File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ represented by the pull requests that fixed them. Critical items to know are:
1414Versions correspond with GitHub releases that can be referenced with @ using actions.
1515
1616## [ master] ( https://github.com/vsoch/pull-request-action/tree/master ) (master)
17+ - bugfix of token handling if 401 error received (missing 401 case) (1.0.21)
1718 - bugfix of writing to environment file (missing newline) (1.0.19)
1819 - bugfix of missing from branch with scheduled run (1.0.16)
1920 - forgot to add assignees (1.0.15)
Original file line number Diff line number Diff line change @@ -180,8 +180,8 @@ def list_pull_requests(target, source):
180180 print ("Params for checking if pull request exists: %s" % params )
181181 response = requests .get (PULLS_URL , params = params )
182182
183- # Case 1: 404 might warrant needing a token
184- if response .status_code == 404 :
183+ # Case 1: 401, 404 might warrant needing a token
184+ if response .status_code in [ 401 , 404 ] :
185185 response = requests .get (PULLS_URL , params = params , headers = HEADERS )
186186 if response .status_code != 200 :
187187 abort_if_fail (response , "Unable to retrieve information about pull requests" )
@@ -238,7 +238,7 @@ def find_default_branch():
238238 """Find default branch for a repo (only called if branch not provided)"""
239239 response = requests .get (REPO_URL )
240240
241- # Case 1: 404 might need a token
241+ # Case 1: 401, 404 might need a token
242242 if response .status_code in [401 , 404 ]:
243243 response = requests .get (REPO_URL , headers = HEADERS )
244244 if response .status_code != 200 :
You can’t perform that action at this time.
0 commit comments