aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2022-07-27 20:09:20 +0000
committerTom Stellard <tstellar@redhat.com>2022-07-27 13:12:07 -0700
commit89d3c9634b15c3b3f56c7e1b37644f9eb7413dc6 (patch)
tree889031342b58a30f36dad3b5f88ba5672dd7d5a0
parente27026cce16a98f923bbdb71362334faf6d68cd3 (diff)
downloadllvm-89d3c9634b15c3b3f56c7e1b37644f9eb7413dc6.zip
llvm-89d3c9634b15c3b3f56c7e1b37644f9eb7413dc6.tar.gz
llvm-89d3c9634b15c3b3f56c7e1b37644f9eb7413dc6.tar.bz2
workflows: Fix pull request creation for backports
This was broken by 17d4796cc84618e9b15f9484e5576127c431bc60.
-rwxr-xr-xllvm/utils/git/github-automation.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index 8699bda7..f1ce69d 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -301,7 +301,7 @@ class ReleaseWorkflow:
pulls = repo.get_pulls(head=head)
return pulls.totalCount != 0
- def create_pull_request(self, owner:str, branch:str) -> bool:
+ def create_pull_request(self, owner:str, repo_name:str, branch:str) -> bool:
"""
reate a pull request in `self.branch_repo_name`. The base branch of the
pull request will be choosen based on the the milestone attached to
@@ -327,7 +327,7 @@ class ReleaseWorkflow:
push_done = False
for i in range(0,5):
try:
- local_repo.git.fetch(f'https://github.com/{owner}/llvm-project', f'{branch}:{branch}')
+ local_repo.git.fetch(f'https://github.com/{owner}/{repo_name}', f'{branch}:{branch}')
local_repo.git.push(self.push_url, f'{branch}:{head_branch}', force=True)
push_done = True
break
@@ -392,8 +392,9 @@ class ReleaseWorkflow:
m = re.match('([^/]+)/([^/]+)/(.+)', args)
if m:
owner = m.group(1)
+ repo = m.group(2)
branch = m.group(3)
- return self.create_pull_request(owner, branch)
+ return self.create_pull_request(owner, repo, branch)
print("Do not understand input:")
print(sys.stdin.readlines())