You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hawq.apache.org by Ming Li <ml...@pivotal.io> on 2016/09/08 03:42:50 UTC

Please append 'close #PR_id' to commit message when you merge other's pull request

Hi all committers,

It seems that we can not close other's pull request conviently (
https://issues.apache.org/jira/browse/INFRA-12580),  it is better to tell
git hook automatically close PR automatically.

Here is the steps I added into the wiki(
https://cwiki.apache.org/confluence/display/HAWQ/Contributing+to+HAWQ):
# In case of some contributor often forget to close pull request,
# Append commit message to automatically close pull request after code
merged. e.g. PR number is 12:
run `git commit --amend` and append "(close #12)" to commit message.

Re: Please append 'close #PR_id' to commit message when you merge other's pull request

Posted by Lei Chang <le...@apache.org>.
looks a great idea. Roman.

Cheers
Lei


On Thu, Sep 8, 2016 at 2:13 PM, Roman Shaposhnik <ro...@shaposhnik.org>
wrote:

> On Wed, Sep 7, 2016 at 11:08 PM, Lei Chang <le...@apache.org> wrote:
> > @ming, there is a discussion on this mailing list before about what
> should
> > be included in the commit message.
> >
> > Appending "close #" makes the commit message very messy.
> >
> > So the conclusion at that time is to not append "close #" to a commit
> > message.
> >
> > If someone forgets closing a pull request, looks better to add a reminder
> > to the pull request.
>
> Not to reopen that old discussion, but have you guys considered adding
> it to the body of the commit? That way it won't mess up git log and such
> but will still have the desired effect.
>
> Thanks,
> Roman.
>

Re: Please append 'close #PR_id' to commit message when you merge other's pull request

Posted by Ming Li <ml...@pivotal.io>.
Thanks Roman,

So we need a new line character.  I changed wiki as below:
run `git commit --amend` and append "(close #12)" in a new line to commit
message.

On Sat, Sep 10, 2016 at 3:27 AM, Roman Shaposhnik <ro...@shaposhnik.org>
wrote:

> E.g.
>
> $ git commit -m 'HAWQ-XXX. This is a commit log line
>
> closes #YYY'
>
> Note that once you type ' on the command line you can type
> a new line character and keep typing until you hit ' again.
>
> Thanks,
> Roman.
>
> On Fri, Sep 9, 2016 at 1:19 AM, Ming Li <ml...@pivotal.io> wrote:
> > Yes, I wonder how to add to the body. It seems there is only message
> > without title/body.
> > Could you share me the shell command?
> >
> > Thanks Lei.
> >
> > On Fri, Sep 9, 2016 at 4:13 PM, Lei Chang <ch...@gmail.com>
> wrote:
> >
> >> ming, I think Roman has already suggested a solution. Add "close #" in
> the
> >> commit message body instead of message title. Does it solve your
> concerns?
> >>
> >> Cheers
> >> Lei
> >>
> >>
> >>
> >>
> >> On Fri, Sep 9, 2016 at 1:09 PM +0800, "Ming Li" <ml...@pivotal.io> wrote:
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> I think we should offer a solution for this problem, even if the
> solution
> >> is not good enough. If you find a better solution for it, we can
> enhance
> >> it afterward.
> >>
> >> On Thu, Sep 8, 2016 at 3:16 PM, Ming Li  wrote:
> >>
> >> > Hi Roman,
> >> >
> >> > The problem is still have someone forget to close PR, and we can't
> >> contact
> >> > him only using email notification.
> >> >
> >> > As for your suggestion, could you please share with us the exact steps
> >> how
> >> > to do it? Thanks.
> >> >
> >> > On Thu, Sep 8, 2016 at 2:13 PM, Roman Shaposhnik
> >> > wrote:
> >> >
> >> >> On Wed, Sep 7, 2016 at 11:08 PM, Lei Chang  wrote:
> >> >> > @ming, there is a discussion on this mailing list before about what
> >> >> should
> >> >> > be included in the commit message.
> >> >> >
> >> >> > Appending "close #" makes the commit message very messy.
> >> >> >
> >> >> > So the conclusion at that time is to not append "close #" to a
> commit
> >> >> > message.
> >> >> >
> >> >> > If someone forgets closing a pull request, looks better to add a
> >> >> reminder
> >> >> > to the pull request.
> >> >>
> >> >> Not to reopen that old discussion, but have you guys considered
> adding
> >> >> it to the body of the commit? That way it won't mess up git log and
> such
> >> >> but will still have the desired effect.
> >> >>
> >> >> Thanks,
> >> >> Roman.
> >> >>
> >> >
> >> >
> >>
> >>
> >>
> >>
> >>
> >>
>

Re: Please append 'close #PR_id' to commit message when you merge other's pull request

Posted by Roman Shaposhnik <ro...@shaposhnik.org>.
E.g.

$ git commit -m 'HAWQ-XXX. This is a commit log line

closes #YYY'

Note that once you type ' on the command line you can type
a new line character and keep typing until you hit ' again.

Thanks,
Roman.

On Fri, Sep 9, 2016 at 1:19 AM, Ming Li <ml...@pivotal.io> wrote:
> Yes, I wonder how to add to the body. It seems there is only message
> without title/body.
> Could you share me the shell command?
>
> Thanks Lei.
>
> On Fri, Sep 9, 2016 at 4:13 PM, Lei Chang <ch...@gmail.com> wrote:
>
>> ming, I think Roman has already suggested a solution. Add "close #" in the
>> commit message body instead of message title. Does it solve your concerns?
>>
>> Cheers
>> Lei
>>
>>
>>
>>
>> On Fri, Sep 9, 2016 at 1:09 PM +0800, "Ming Li" <ml...@pivotal.io> wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I think we should offer a solution for this problem, even if the solution
>> is not good enough. If you find a better solution for it, we can  enhance
>> it afterward.
>>
>> On Thu, Sep 8, 2016 at 3:16 PM, Ming Li  wrote:
>>
>> > Hi Roman,
>> >
>> > The problem is still have someone forget to close PR, and we can't
>> contact
>> > him only using email notification.
>> >
>> > As for your suggestion, could you please share with us the exact steps
>> how
>> > to do it? Thanks.
>> >
>> > On Thu, Sep 8, 2016 at 2:13 PM, Roman Shaposhnik
>> > wrote:
>> >
>> >> On Wed, Sep 7, 2016 at 11:08 PM, Lei Chang  wrote:
>> >> > @ming, there is a discussion on this mailing list before about what
>> >> should
>> >> > be included in the commit message.
>> >> >
>> >> > Appending "close #" makes the commit message very messy.
>> >> >
>> >> > So the conclusion at that time is to not append "close #" to a commit
>> >> > message.
>> >> >
>> >> > If someone forgets closing a pull request, looks better to add a
>> >> reminder
>> >> > to the pull request.
>> >>
>> >> Not to reopen that old discussion, but have you guys considered adding
>> >> it to the body of the commit? That way it won't mess up git log and such
>> >> but will still have the desired effect.
>> >>
>> >> Thanks,
>> >> Roman.
>> >>
>> >
>> >
>>
>>
>>
>>
>>
>>

Re: Please append 'close #PR_id' to commit message when you merge other's pull request

Posted by Ming Li <ml...@pivotal.io>.
Yes, I wonder how to add to the body. It seems there is only message
without title/body.
Could you share me the shell command?

Thanks Lei.

On Fri, Sep 9, 2016 at 4:13 PM, Lei Chang <ch...@gmail.com> wrote:

> ming, I think Roman has already suggested a solution. Add "close #" in the
> commit message body instead of message title. Does it solve your concerns?
>
> Cheers
> Lei
>
>
>
>
> On Fri, Sep 9, 2016 at 1:09 PM +0800, "Ming Li" <ml...@pivotal.io> wrote:
>
>
>
>
>
>
>
>
>
>
> I think we should offer a solution for this problem, even if the solution
> is not good enough. If you find a better solution for it, we can  enhance
> it afterward.
>
> On Thu, Sep 8, 2016 at 3:16 PM, Ming Li  wrote:
>
> > Hi Roman,
> >
> > The problem is still have someone forget to close PR, and we can't
> contact
> > him only using email notification.
> >
> > As for your suggestion, could you please share with us the exact steps
> how
> > to do it? Thanks.
> >
> > On Thu, Sep 8, 2016 at 2:13 PM, Roman Shaposhnik
> > wrote:
> >
> >> On Wed, Sep 7, 2016 at 11:08 PM, Lei Chang  wrote:
> >> > @ming, there is a discussion on this mailing list before about what
> >> should
> >> > be included in the commit message.
> >> >
> >> > Appending "close #" makes the commit message very messy.
> >> >
> >> > So the conclusion at that time is to not append "close #" to a commit
> >> > message.
> >> >
> >> > If someone forgets closing a pull request, looks better to add a
> >> reminder
> >> > to the pull request.
> >>
> >> Not to reopen that old discussion, but have you guys considered adding
> >> it to the body of the commit? That way it won't mess up git log and such
> >> but will still have the desired effect.
> >>
> >> Thanks,
> >> Roman.
> >>
> >
> >
>
>
>
>
>
>

Re: Please append 'close #PR_id' to commit message when you merge other's pull request

Posted by Lei Chang <ch...@gmail.com>.
ming, I think Roman has already suggested a solution. Add "close #" in the commit message body instead of message title. Does it solve your concerns?

Cheers
Lei




On Fri, Sep 9, 2016 at 1:09 PM +0800, "Ming Li" <ml...@pivotal.io> wrote:










I think we should offer a solution for this problem, even if the solution
is not good enough. If you find a better solution for it, we can  enhance
it afterward.

On Thu, Sep 8, 2016 at 3:16 PM, Ming Li  wrote:

> Hi Roman,
>
> The problem is still have someone forget to close PR, and we can't contact
> him only using email notification.
>
> As for your suggestion, could you please share with us the exact steps how
> to do it? Thanks.
>
> On Thu, Sep 8, 2016 at 2:13 PM, Roman Shaposhnik 
> wrote:
>
>> On Wed, Sep 7, 2016 at 11:08 PM, Lei Chang  wrote:
>> > @ming, there is a discussion on this mailing list before about what
>> should
>> > be included in the commit message.
>> >
>> > Appending "close #" makes the commit message very messy.
>> >
>> > So the conclusion at that time is to not append "close #" to a commit
>> > message.
>> >
>> > If someone forgets closing a pull request, looks better to add a
>> reminder
>> > to the pull request.
>>
>> Not to reopen that old discussion, but have you guys considered adding
>> it to the body of the commit? That way it won't mess up git log and such
>> but will still have the desired effect.
>>
>> Thanks,
>> Roman.
>>
>
>






Re: Please append 'close #PR_id' to commit message when you merge other's pull request

Posted by Ming Li <ml...@pivotal.io>.
I think we should offer a solution for this problem, even if the solution
is not good enough. If you find a better solution for it, we can  enhance
it afterward.

On Thu, Sep 8, 2016 at 3:16 PM, Ming Li <ml...@pivotal.io> wrote:

> Hi Roman,
>
> The problem is still have someone forget to close PR, and we can't contact
> him only using email notification.
>
> As for your suggestion, could you please share with us the exact steps how
> to do it? Thanks.
>
> On Thu, Sep 8, 2016 at 2:13 PM, Roman Shaposhnik <ro...@shaposhnik.org>
> wrote:
>
>> On Wed, Sep 7, 2016 at 11:08 PM, Lei Chang <le...@apache.org> wrote:
>> > @ming, there is a discussion on this mailing list before about what
>> should
>> > be included in the commit message.
>> >
>> > Appending "close #" makes the commit message very messy.
>> >
>> > So the conclusion at that time is to not append "close #" to a commit
>> > message.
>> >
>> > If someone forgets closing a pull request, looks better to add a
>> reminder
>> > to the pull request.
>>
>> Not to reopen that old discussion, but have you guys considered adding
>> it to the body of the commit? That way it won't mess up git log and such
>> but will still have the desired effect.
>>
>> Thanks,
>> Roman.
>>
>
>

Re: Please append 'close #PR_id' to commit message when you merge other's pull request

Posted by Ming Li <ml...@pivotal.io>.
Hi Roman,

The problem is still have someone forget to close PR, and we can't contact
him only using email notification.

As for your suggestion, could you please share with us the exact steps how
to do it? Thanks.

On Thu, Sep 8, 2016 at 2:13 PM, Roman Shaposhnik <ro...@shaposhnik.org>
wrote:

> On Wed, Sep 7, 2016 at 11:08 PM, Lei Chang <le...@apache.org> wrote:
> > @ming, there is a discussion on this mailing list before about what
> should
> > be included in the commit message.
> >
> > Appending "close #" makes the commit message very messy.
> >
> > So the conclusion at that time is to not append "close #" to a commit
> > message.
> >
> > If someone forgets closing a pull request, looks better to add a reminder
> > to the pull request.
>
> Not to reopen that old discussion, but have you guys considered adding
> it to the body of the commit? That way it won't mess up git log and such
> but will still have the desired effect.
>
> Thanks,
> Roman.
>

Re: Please append 'close #PR_id' to commit message when you merge other's pull request

Posted by Roman Shaposhnik <ro...@shaposhnik.org>.
On Wed, Sep 7, 2016 at 11:08 PM, Lei Chang <le...@apache.org> wrote:
> @ming, there is a discussion on this mailing list before about what should
> be included in the commit message.
>
> Appending "close #" makes the commit message very messy.
>
> So the conclusion at that time is to not append "close #" to a commit
> message.
>
> If someone forgets closing a pull request, looks better to add a reminder
> to the pull request.

Not to reopen that old discussion, but have you guys considered adding
it to the body of the commit? That way it won't mess up git log and such
but will still have the desired effect.

Thanks,
Roman.

Re: Please append 'close #PR_id' to commit message when you merge other's pull request

Posted by Lei Chang <le...@apache.org>.
@ming, there is a discussion on this mailing list before about what should
be included in the commit message.

Appending "close #" makes the commit message very messy.

So the conclusion at that time is to not append "close #" to a commit
message.

If someone forgets closing a pull request, looks better to add a reminder
to the pull request.

Cheers
Lei


On Thu, Sep 8, 2016 at 11:42 AM, Ming Li <ml...@pivotal.io> wrote:

> Hi all committers,
>
> It seems that we can not close other's pull request conviently (
> https://issues.apache.org/jira/browse/INFRA-12580),  it is better to tell
> git hook automatically close PR automatically.
>
> Here is the steps I added into the wiki(
> https://cwiki.apache.org/confluence/display/HAWQ/Contributing+to+HAWQ):
> # In case of some contributor often forget to close pull request,
> # Append commit message to automatically close pull request after code
> merged. e.g. PR number is 12:
> run `git commit --amend` and append "(close #12)" to commit message.
>