You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ij...@apache.org on 2017/11/10 12:41:57 UTC

kafka git commit: MINOR: Exclude Committer Checklist section from commit message

Repository: kafka
Updated Branches:
  refs/heads/trunk 50a44ee6a -> d04daf570


MINOR: Exclude Committer Checklist section from commit message

It seems like it's sufficient to be able to refer to it in the PR.

Author: Ismael Juma <is...@juma.me.uk>

Reviewers: Rajini Sivaram <ra...@googlemail.com>

Closes #4202 from ijuma/exclude-committer-checklist-when-merging


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/d04daf57
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/d04daf57
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/d04daf57

Branch: refs/heads/trunk
Commit: d04daf570ec4064ae6b3fe5f60f6ce6e0df7ecbc
Parents: 50a44ee
Author: Ismael Juma <is...@juma.me.uk>
Authored: Fri Nov 10 12:34:21 2017 +0000
Committer: Ismael Juma <is...@juma.me.uk>
Committed: Fri Nov 10 12:34:21 2017 +0000

----------------------------------------------------------------------
 PULL_REQUEST_TEMPLATE.md |  4 ++--
 kafka-merge-pr.py        | 14 ++++++++++----
 2 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/d04daf57/PULL_REQUEST_TEMPLATE.md
----------------------------------------------------------------------
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
index 3a3a491..552a4d0 100644
--- a/PULL_REQUEST_TEMPLATE.md
+++ b/PULL_REQUEST_TEMPLATE.md
@@ -1,6 +1,6 @@
 *More detailed description of your change,
 if necessary. The PR title and PR message become
-the squashed commit message so use a separate
+the squashed commit message, so use a separate
 comment to ping reviewers.*
 
 *Summary of testing strategy (including rationale)
@@ -8,7 +8,7 @@ for the feature or bug fix. Unit and/or integration
 tests are expected for any behaviour change and
 system tests should be considered for larger changes.*
 
-### Committer Checklist
+### Committer Checklist (excluded from commit message)
 - [ ] Verify design and implementation 
 - [ ] Verify test coverage and CI build status
 - [ ] Verify documentation (including upgrade notes)

http://git-wip-us.apache.org/repos/asf/kafka/blob/d04daf57/kafka-merge-pr.py
----------------------------------------------------------------------
diff --git a/kafka-merge-pr.py b/kafka-merge-pr.py
index db1427e..be94427 100755
--- a/kafka-merge-pr.py
+++ b/kafka-merge-pr.py
@@ -157,16 +157,22 @@ def merge_pr(pr_num, target_ref, title, body, pr_repo_desc):
     merge_message_flags = []
 
     merge_message_flags += ["-m", title]
+    
     if body is not None:
-        # We remove @ symbols from the body to avoid triggering e-mails
-        # to people every time someone creates a public fork of the project.
-        merge_message_flags += ["-m", body.replace("@", "")]
+        # Remove "Committer Checklist" section
+        checklist_index = body.find("### Committer Checklist")
+        if checklist_index != -1:
+            body = body[:checklist_index].rstrip()
+        # Remove @ symbols from the body to avoid triggering e-mails to people every time someone creates a
+        # public fork of the project.
+        body = body.replace("@", "")
+        merge_message_flags += ["-m", body]
 
     authors = "\n".join(["Author: %s" % a for a in distinct_authors])
 
     merge_message_flags += ["-m", authors]
 
-    if (reviewers != ""):
+    if reviewers != "":
         merge_message_flags += ["-m", "Reviewers: %s" % reviewers]
 
     if had_conflicts: