<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, 10 Jul 2017 at 07:57 Berker Peksağ <<a href="mailto:berker.peksag@gmail.com">berker.peksag@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Jul 10, 2017 at 4:14 PM, Serhiy Storchaka <<a href="mailto:storchaka@gmail.com" target="_blank">storchaka@gmail.com</a>> wrote:<br>
> When a PR is consistent on several commits, the final commit message<br>
> composed by GitHub contains messages of all these commits: "fix typo",<br>
> "address yyy comments", "revert zzz". If the initial commit message<br>
> contained errors (e.g. absent issue number), it is easy to edit the title<br>
> and text of a PR, but the initial commit message lefts unchanged. GitHub<br>
> allows to edit the commit message of squashed commit, and please don't<br>
> ignore this possibility. Otherwise the commit message in the repository will<br>
> be ugly if not worse.<br>
<br>
+1! (and thank you for writing this email, Serhiy)<br>
<br>
I can't think of a way to automatically prevent a PR from merging if<br>
body of the squashed commit contains "fix typo" commits. I think this<br>
is a pretty annoying problem and perhaps we should ask contributors to<br>
squash multiple commits themselves even if we continue to use the<br>
"squash and merge" option.<br></blockquote><div><br></div><div>There's isn't a way to block a merge at that stage. But one thing I've been thinking about is adding a check to Bedevere post-merge that sees if the commit message was left unchanged (not quite sure if I can come up with a reliable heuristic, though). In instances where the committers forgot, Bedevere would simply leave a message saying something like, "Hey, thanks for taking the time to merge a PR, but please don't forget to clean up the commit message before merging." Basically a friendly reminder to not forget next time (I'm also thinking of doing something similar for the formatting of the PR title after merging). <br></div></div></div>