generator-jhipster icon indicating copy to clipboard operation
generator-jhipster copied to clipboard

Git Commit Guidelines are outdated

Open emilpaw opened this issue 3 years ago • 2 comments

Overview of the feature request

In the contribution guidelines, there are some rules about how to format the commit messages. Most commits in the repository don't follow the rules. Especially the one about capitalizing the first letter: https://github.com/jhipster/generator-jhipster/blob/dbf76ed6209f2ba02fb30476893e9ff0588776fd/CONTRIBUTING.md?plain=1#L376 and about being required to add a Github keyword in the footer of the message: https://github.com/jhipster/generator-jhipster/blob/dbf76ed6209f2ba02fb30476893e9ff0588776fd/CONTRIBUTING.md?plain=1#L390-L391

I think we should change the rules to required capitalization (as most commits already do).

Regarding the rule to always use Github keywords in the footer, I don't think it's a requirement in all cases since sometimes a Commit is not directly related to the commit which is worked on. e.g. small refactorings or fixed typos.

Motivation for or Use Case

Rules which are not followed are useless at best and confusing at worst. Commit messages which follow a convention are easier to read.

Related issues or PR
  • [x] Checking this box is mandatory (this is just to show you read everything)

emilpaw avatar May 30 '22 09:05 emilpaw

At least for the footer I understand the must for automatic closing (otherwise it won't work). So no must for a footer in general as (you said correctly) not every commit relates to an issue.

atomfrede avatar May 30 '22 09:05 atomfrede

At least for the footer I understand the must for automatic closing (otherwise it won't work). So no must for a footer in general as (you said correctly) not every commit relates to an issue.

You can use the keywords in the PR message instead of the commit message. Then you don't have to think about which commit message to add them to and since keywords are a GitHub feature I think it's more natural to put it in the PR instead of the commit.

emilpaw avatar May 30 '22 14:05 emilpaw

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days

github-actions[bot] avatar Dec 11 '23 00:12 github-actions[bot]