You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2019/09/18 23:02:39 UTC
[spark] branch branch-2.4 updated: [SPARK-28616][INFRA] Improve
merge-spark-pr script to warn WIP PRs and strip trailing dots
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-2.4 by this push:
new 0770037 [SPARK-28616][INFRA] Improve merge-spark-pr script to warn WIP PRs and strip trailing dots
0770037 is described below
commit 077003787e52f265cd29c57be424766f268d67c6
Author: Dongjoon Hyun <dh...@apple.com>
AuthorDate: Sun Aug 4 21:23:54 2019 -0700
[SPARK-28616][INFRA] Improve merge-spark-pr script to warn WIP PRs and strip trailing dots
## What changes were proposed in this pull request?
This PR aims to improve the `merge-spark-pr` script in the following two ways.
1. `[WIP]` is useful when we show that a PR is not ready for merge. Apache Spark allows merging `WIP` PRs. However, sometime, we accidentally forgot to clean up the title for the completed PRs. We had better warn once more during merging stage and get a confirmation from the committers.
2. We have two kinds of PR titles in terms of the ending period. This PR aims to remove the trailing `dot` since the shorter is the better in the commit title. Also, the PR titles without the trailing `dot` is dominant in the Apache Spark commit logs.
```
$ git log --oneline | grep '[.]$' | wc -l
4090
$ git log --oneline | grep '[^.]$' | wc -l
20747
```
## How was this patch tested?
Manual.
```
$ dev/merge_spark_pr.py
git rev-parse --abbrev-ref HEAD
Which pull request would you like to merge? (e.g. 34): 25157
The PR title has `[WIP]`:
[WIP][SPARK-28396][SQL] Add PathCatalog for data source V2
Continue? (y/n):
```
```
$ dev/merge_spark_pr.py
git rev-parse --abbrev-ref HEAD
Which pull request would you like to merge? (e.g. 34): 25304
I've re-written the title as follows to match the standard format:
Original: [SPARK-28570][CORE][SHUFFLE] Make UnsafeShuffleWriter use the new API.
Modified: [SPARK-28570][CORE][SHUFFLE] Make UnsafeShuffleWriter use the new API
Would you like to use the modified title? (y/n):
```
Closes #25356 from dongjoon-hyun/SPARK-28616.
Authored-by: Dongjoon Hyun <dh...@apple.com>
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
(cherry picked from commit ae08387b4c71876398fd022f5832506741f04832)
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
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 cca6f40..03ff428 100755
--- a/dev/merge_spark_pr.py
+++ b/dev/merge_spark_pr.py
@@ -453,8 +453,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"])
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org