[llvm] 1889170 - workflow: When updating the issueXX branch, use force push

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 23:04:06 PDT 2022


Author: Tobias Hieta
Date: 2022-04-12T08:03:59+02:00
New Revision: 1889170aeb61da6509d75069726bc1a4aa7c9113

URL: https://github.com/llvm/llvm-project/commit/1889170aeb61da6509d75069726bc1a4aa7c9113
DIFF: https://github.com/llvm/llvm-project/commit/1889170aeb61da6509d75069726bc1a4aa7c9113.diff

LOG: workflow: When updating the issueXX branch, use force push

Otherwise if you try to update the branch with a new /cherry-pick
from the same issue you will run into problems similar as to the
one shown in this workflow:
https://github.com/llvm/llvm-project/runs/5864672298?check_suite_focus=true

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D123365

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 aa4284c1e1921..3164371d8c6ae 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -185,7 +185,7 @@ def create_branch(self, commits:List[str]) -> bool:
 
         push_url = self.push_url
         print('Pushing to {} {}'.format(push_url, branch_name))
-        local_repo.git.push(push_url, 'HEAD:{}'.format(branch_name))
+        local_repo.git.push(push_url, 'HEAD:{}'.format(branch_name), force=True)
 
         self.issue_notify_branch()
         self.issue_remove_cherry_pick_failed_label()


        


More information about the llvm-commits mailing list