Fix unused sorted value in update-release-branch
Fix a minor issue in the update-release-branch.py script that performs a call to `sorted` but doesn't use the output. Since `sorted` does not operate in place, the call is currently useless. As a result, the function `get_pr_for_commit` does not currently work as exected. I.e. it is expected to return the "first" (i.e. lowest PR number), but actually it returns the first in the list provided by GitHub.
This commit is contained in:
parent
4e8634c29c
commit
cf8c79ca35
1 changed files with 2 additions and 2 deletions
4
.github/update-release-branch.py
vendored
4
.github/update-release-branch.py
vendored
|
|
@ -123,8 +123,8 @@ def get_pr_for_commit(repo, commit):
|
|||
if prs.totalCount > 0:
|
||||
# In the case that there are multiple PRs, return the earliest one
|
||||
prs = list(prs)
|
||||
sorted(prs, key=lambda pr: int(pr.number))
|
||||
return prs[0]
|
||||
sorted_prs = sorted(prs, key=lambda pr: int(pr.number))
|
||||
return sorted_prs[0]
|
||||
else:
|
||||
return None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue