Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer mention issue and PR numbers in commit title #79

Closed
nipafx opened this issue May 15, 2018 · 5 comments
Closed

No longer mention issue and PR numbers in commit title #79

nipafx opened this issue May 15, 2018 · 5 comments

Comments

@nipafx
Copy link
Member

nipafx commented May 15, 2018

The current contribution guidelines define the following outline for commit messages, where the first line (let's call it "title") has an ideal length of 50 characters, with a maximum of 70:

${action} (${issues} / ${pull-request})

${body}

Mentioning issue and pull request numbers in the title has the advantage of making them very visible, for example in git log --oneline and GitHub's UI, but has the downside of severely reducing the number of available characters for the title itself. Once we cross into three digit issue/PR numbers (#abc / #xyz) eats up at least 14 characters - that's not good.

As an alternative, issues and pull requests could be added as a last line to the message:

${action}

${body}

${issues} / ${pull-request}

Opinions?

@sormuras
Copy link
Member

70? 2 8 0 !

Your proposal looks good to me.

@sbrannen
Copy link

I agree, but let's also use prefixes for the issue and PR numbers -- for example:

${action}

${body}

Issue: ${issues} / ${pull-request}

Where "Issue" can be:

  • Issue
  • Issues
  • Fixes
  • Closes

@nipafx
Copy link
Member Author

nipafx commented May 16, 2018

@sbrannen Are the replacements for "Issue" meant to be GitHub keywords? If so, we have to get rid of the colon, don't we?

@nipafx
Copy link
Member Author

nipafx commented May 16, 2018

I just looked over the list of commits and I have to say, I really like what I see: the issue and PR numbers out in the open. Are we sure we want to give that up?

Since I seem to be the only one thinking "No" and ... team ... democracy ... yadda yadda yadda 😉 ... check #86.

@sbrannen
Copy link

Are the replacements for "Issue" meant to be GitHub keywords?

Jein ("yes & no" for non-German speakers). 😉

It's a mix. See explanation here: #86 (comment)

If so, we have to get rid of the colon, don't we?

Nope. GitHub has no problem with the colon.

@nipafx nipafx closed this as completed in #86 Jun 4, 2018
nipafx pushed a commit that referenced this issue Jun 4, 2018
The contribution guidelines defined the following outline for commit
messages, where the first line (let's call it "title") has an ideal
length of 50 characters, with a maximum of 70:

${action} (${issues} / ${pull-request})

${body}

Mentioning issue and pull request numbers in the title has the
advantage of making them very visible, for example in
`git log --oneline` and GitHub's UI, but has the downside of severely
reducing the number of available characters for the title itself.
Once we cross into three digit issue/PR numbers `(#abc / #xyz)` eats
up at least 14 characters - that's not good.

The new guideline places issue and pull request number at the bottom
of the message:

```
${action}

${body}

${references}: ${issues}
PR: ${pull-request}
```

Here, `${references}` is usually _Closes_, _Fixes_, or _Resolves_,
but if none of that is the case, can also be _Issue(s)_.

Closes: #79
PR: #86
nipafx pushed a commit that referenced this issue Jun 16, 2020
This was the rule until #79 / #86 changed it. We now consider that a
bad decision and want to start doing it again. An important factor
was that IDEs can make issue and PR numbers clickable links, which
adds additional value to making them easily accessible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants