homu icon indicating copy to clipboard operation
homu copied to clipboard

Fix PR template and Reviewable from merge commits

Open aneeshusa opened this issue 8 years ago • 8 comments

We recently added a PR template to the main Servo repo to smooth the contributing workflow. However, this template gets copied into homu's merge commit messages, generating a lot of noise in the commit logs.

Use heuristics to strip both the PR template and the Reviewable footer. First, the main body of the PR template and the Reviewable footer are removed, as these are always the same (except for if the boxes are checked) and always at the bottom. The other part of the PR template is a header comment; some users replace it, while others leave it, and even though the message says to write below that line, some users write above it. So, simply remove it and trim any extra newlines. These heuristics should robustly leave the body untouched if the template is changed.

Tested against an excerpt of recent commit messages from Servo.

Fixes #36. Fixes servo/servo#11153. Supersedes #37.


This change is Reviewable

aneeshusa avatar May 27 '16 02:05 aneeshusa

So the checks are preserved? (since one of the rows asks you to mention an issue number, which we want)

Manishearth avatar May 27 '16 02:05 Manishearth

Right now it strips that out, but I can make it keep that line if the issue number isn't blank. Is there anything else that should be kept from the PR template?

aneeshusa avatar May 27 '16 03:05 aneeshusa

Yeah, please keep it. Otherwise, not that I know of

Manishearth avatar May 27 '16 04:05 Manishearth

Can we add <!-- homu strip --> comments to the template instead?

Ms2ger avatar May 27 '16 08:05 Ms2ger

Designating the parts to strip in the template itself makes sense to me. We should be sure to do so in a way that doesn't make it more confusing, however.

jdm avatar May 27 '16 11:05 jdm

Yes, <!-- homu strip --> sounds a lot better to me - it avoids us hardcoding servo inside homu.

cgwalters avatar May 27 '16 13:05 cgwalters

Or <hr class="homu-strip">, this way it's even visible.

nox avatar Mar 02 '17 14:03 nox

:umbrella: The latest upstream changes (presumably #103) made this pull request unmergeable. Please resolve the merge conflicts.

bors-servo avatar Mar 24 '17 19:03 bors-servo