I wouldn't like to enforce it for commits that are part of the pull request
review flow, I think it would be a burden for new contributors.

To track the origin of a commit we can always look on Github web interface
(at the top of the commit). For example: this commit
<https://github.com/apache/tinkerpop/commit/43519778b0f0c71a93ff0d91efc153995e1ebec6>
shows
the link to #798 <https://github.com/apache/tinkerpop/pull/798>

If we need to implement something more sophisticated, I like Node.js core
guidelines
<https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md#landing-pull-requests>
that generates commits like this
<https://github.com/nodejs/node/commit/a2c0fcc0d8bc9bd4559089f1182b13a2ae7bb318>,
that includes author, pr and reviewers info, thanks to a tool.

On Wed, Mar 14, 2018 at 5:22 PM, Stephen Mallette <[email protected]>
wrote:

> We put it on the pull request headers, but those don't make it into the
> commit logs. I'd like it in the commit message itself in addition to the PR
> title. I don't think we have any such policy in the dev docs at this point
> beyond the requirement for the PR.
>
>
>
> On Wed, Mar 14, 2018 at 11:59 AM, Robert Dale <[email protected]> wrote:
>
> > I thought we already did that except for merges and CTRs.  Did you want
> to
> > include it in all commit messages?  Or is it to formalize it in the
> > Developer Docs?
> >
> > Robert Dale
> >
> > On Wed, Mar 14, 2018 at 11:54 AM, Stephen Mallette <[email protected]
> >
> > wrote:
> >
> > > I tend to tie my commits to JIRA by prefixing the first line of my
> commit
> > > with the JIRA ticket to which it applies. How does everyone feel about
> > > following that pattern? I hate to institute extra stuff on folks, but
> for
> > > various reasons I spend time in commit logs and there are times when I
> > have
> > > the worst time mapping a commit to a particular JIRA (which typically
> > holds
> > > the details that I need related to the change itself). It would save
> me a
> > > ton of time if folks included the JIRA id as a prefix on the commit.
> > >
> > > It doesn't need to be perfect. I don't think that we need to go to
> > lengths
> > > of forcing new contributors to re-cast PRs if they don't include the
> > prefix
> > > or anything like that, but for those of us who are committers to the
> > > project I'm wondering if there are any objections to trying to adhere
> to
> > > that approach.
> > >
> > > Maybe this doesn't even really need discussion or objection so much -
> for
> > > now, perhaps it's just a request from me to change up your commit flow
> to
> > > make traceability a bit easier in our project.
> > >
> > > Anyway, thanks for reading...
> > >
> > > Stephen
> > >
> >
>

Reply via email to