[llvm] 560efad - workflows: Release Workflow - Avoid selecting random reviewers when no phab review
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 2 14:07:34 PDT 2022
Author: Tom Stellard
Date: 2022-08-02T14:07:22-07:00
New Revision: 560efad701709cc57021ccb14f91a012c5e835d3
URL: https://github.com/llvm/llvm-project/commit/560efad701709cc57021ccb14f91a012c5e835d3
DIFF: https://github.com/llvm/llvm-project/commit/560efad701709cc57021ccb14f91a012c5e835d3.diff
LOG: workflows: Release Workflow - Avoid selecting random reviewers when no phab review
If you pass a NULL reivew ID to the differential.revision.search API,
it returns all revisions and we were just taking the first one and
assuming it was associated with the commit in the PR.
We need to exit early if we can't find a Phabricator review associated
with a commit.
Added:
Modified:
llvm/utils/git/github-automation.py
Removed:
################################################################################
diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index 5225682f25082..61e43c52b6dbe 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -99,6 +99,9 @@ def phab_get_commit_approvers(phab_token:str, repo:github.Repository.Repository,
# API documentation: https://reviews.llvm.org/conduit/method/
diff erential.parsecommitmessage/
r = phab_api_call(phab_token, "https://reviews.llvm.org/api/
diff erential.parsecommitmessage", args)
review_id = r['result']['revisionIDFieldInfo']['value']
+ if not review_id:
+ # No Phabricator revision for this commit
+ return []
args = {
'constraints[ids][0]' : review_id,
More information about the llvm-commits
mailing list