[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] GH-NNNN vs #NNNN in merge commit

On 1/25/2018 4:22 PM, Berker Peksa? wrote:
> On Thu, Jan 25, 2018 at 11:50 PM, Terry Reedy <tjreedy at udel.edu> wrote:
>> On 1/25/2018 1:03 PM, Mariatta Wijaya wrote:
>>> One idea is maybe have a bot to do the squash commit, for example by
>>> commenting on GitHub:
>>> @merge-bot merge <commit title> <commit message>
>>> So core devs can do the above instead of pressing the commit button. Any
>>> thoughts on this?
>> I can hardly believe that you are seriously proposing that I should replace
>> a click with a 16 char prefix and then retype the title and message.  Did I
>> misunderstand?
> If I understand Mariatta correctly, you can just left a "@merge-bot
> merge" comment if you're happy with the commit message.

There is no 'the commit message' until one presses the merge button.  GH 
then cobbles together a proposed squashed merge commit message from the 
various commit messages. But I am usually not happy with the result.  I 
nearly always usually do a rewriting that a bot cannot do.  This is 
usually easier that starting from scratch.

> Then the bot itself can replace #NNNN with GH-NNNN,

in the title.  As I said elsewhere, I think we should try to find other 
ways to do this independent of the commit message.

> clean the body of the commit message from commits like "* fix typo",

A bot cannot tell which should be deleted and which should be 
incorporated into the message and if so, how.  For instance, the initial 
PR has no test.  Someone adds some, with 'Add tests', resulting in a 
line '* Add tests'.  I typically merge that into a version of the 
initial commit message as part of producing the final merge message.

> squash commits, and merge.

As done now.

Terry Jan Reedy