Skip to content

Commit 2d2611c

Browse files
committed
ORC-1975: Improve merge_orc_pr.py to accept PR numbers as a CLI argument
### What changes were proposed in this pull request? This PR aims to improve `merge_orc_pr.py` to accept PR numbers as a CLI argument. ### Why are the changes needed? To provide a new easy way for the committers to use this script. ### How was this patch tested? Manual review. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #2359 from dongjoon-hyun/ORC-1975. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent ddc0258 commit 2d2611c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dev/merge_orc_pr.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,11 @@ def main():
449449
branch_names = sorted(branch_names, reverse=True)
450450
branch_iter = iter(branch_names)
451451

452-
pr_num = input("Which pull request would you like to merge? (e.g. 34): ")
452+
if len(sys.argv) == 1:
453+
pr_num = input("Which pull request would you like to merge? (e.g. 34): ")
454+
else:
455+
pr_num = sys.argv[1]
456+
print("Start to merge pull request #%s" % (pr_num))
453457
pr = get_json("%s/pulls/%s" % (GITHUB_API_BASE, pr_num))
454458
pr_events = get_json("%s/issues/%s/events" % (GITHUB_API_BASE, pr_num))
455459

0 commit comments

Comments
 (0)