Skip to content

Commit 0fbcc27

Browse files
committed
[SPARK-53467] Improve merge_spark_pr.py to accept PR numbers as a CLI argument
1 parent 58575ab commit 0fbcc27

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dev/merge_spark_pr.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,11 @@ def main():
610610
branch_names = sorted(branch_names, reverse=True)
611611
branch_iter = iter(branch_names)
612612

613-
pr_num = bold_input("Which pull request would you like to merge? (e.g. 34): ")
613+
if len(sys.argv) == 1:
614+
pr_num = bold_input("Which pull request would you like to merge? (e.g. 34): ")
615+
else:
616+
pr_num = sys.argv[1]
617+
print("Start to merge pull request #%s" % (pr_num))
614618
pr = get_json("%s/pulls/%s" % (GITHUB_API_BASE, pr_num))
615619
pr_events = get_json("%s/issues/%s/events" % (GITHUB_API_BASE, pr_num))
616620

0 commit comments

Comments
 (0)