Skip to content

Commit d04daf5

Browse files
committedNov 10, 2017
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 <[email protected]> Reviewers: Rajini Sivaram <[email protected]> Closes apache#4202 from ijuma/exclude-committer-checklist-when-merging
1 parent 50a44ee commit d04daf5

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed
 

‎PULL_REQUEST_TEMPLATE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
*More detailed description of your change,
22
if necessary. The PR title and PR message become
3-
the squashed commit message so use a separate
3+
the squashed commit message, so use a separate
44
comment to ping reviewers.*
55

66
*Summary of testing strategy (including rationale)
77
for the feature or bug fix. Unit and/or integration
88
tests are expected for any behaviour change and
99
system tests should be considered for larger changes.*
1010

11-
### Committer Checklist
11+
### Committer Checklist (excluded from commit message)
1212
- [ ] Verify design and implementation
1313
- [ ] Verify test coverage and CI build status
1414
- [ ] Verify documentation (including upgrade notes)

‎kafka-merge-pr.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,22 @@ def merge_pr(pr_num, target_ref, title, body, pr_repo_desc):
157157
merge_message_flags = []
158158

159159
merge_message_flags += ["-m", title]
160+
160161
if body is not None:
161-
# We remove @ symbols from the body to avoid triggering e-mails
162-
# to people every time someone creates a public fork of the project.
163-
merge_message_flags += ["-m", body.replace("@", "")]
162+
# Remove "Committer Checklist" section
163+
checklist_index = body.find("### Committer Checklist")
164+
if checklist_index != -1:
165+
body = body[:checklist_index].rstrip()
166+
# Remove @ symbols from the body to avoid triggering e-mails to people every time someone creates a
167+
# public fork of the project.
168+
body = body.replace("@", "")
169+
merge_message_flags += ["-m", body]
164170

165171
authors = "\n".join(["Author: %s" % a for a in distinct_authors])
166172

167173
merge_message_flags += ["-m", authors]
168174

169-
if (reviewers != ""):
175+
if reviewers != "":
170176
merge_message_flags += ["-m", "Reviewers: %s" % reviewers]
171177

172178
if had_conflicts:

0 commit comments

Comments
 (0)
Please sign in to comment.