From 0e3c1a232e5701f52d8ec4b223833e56039aeec2 Mon Sep 17 00:00:00 2001 From: Dongjoon Hyun Date: Sun, 4 Aug 2019 18:53:50 -0700 Subject: [PATCH] [SPARK-28616][INFRA] Improve merge-spark-pr script to warn WIP PRs and strip trailing dots --- dev/merge_spark_pr.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/merge_spark_pr.py b/dev/merge_spark_pr.py index 769020b022ab..4c3eb0a170ca 100755 --- a/dev/merge_spark_pr.py +++ b/dev/merge_spark_pr.py @@ -473,8 +473,13 @@ def main(): url = pr["url"] + # Warn if the PR is WIP + if "[WIP]" in pr["title"]: + msg = "The PR title has `[WIP]`:\n%s\nContinue?" % pr["title"] + continue_maybe(msg) + # Decide whether to use the modified title or not - modified_title = standardize_jira_ref(pr["title"]) + modified_title = standardize_jira_ref(pr["title"]).rstrip(".") if modified_title != pr["title"]: print("I've re-written the title as follows to match the standard format:") print("Original: %s" % pr["title"])