Skip to content

Commit

Permalink
MINOR: Exclude Committer Checklist section from commit message
Browse files Browse the repository at this point in the history
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 #4202 from ijuma/exclude-committer-checklist-when-merging
  • Loading branch information
ijuma committed Nov 10, 2017
1 parent 50a44ee commit d04daf5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
*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)
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)
14 changes: 10 additions & 4 deletions kafka-merge-pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d04daf5

Please sign in to comment.