pagarme/git-style-guide

proposal - include scope if necessary

claytonsilva opened this issue · 2 comments

using conventional changelog, we use the scope for a feature in part on solution, example:

a feature in component named "button-action":

feat(button-action): add double click action.

with scope we can group in "areas" like this print:

image

That's a standard that I used to love and it's broadly used, specially by the @angular team.

Here's why I wouldn't use it anymore:

  1. Using words like feat, chore, fix, etc. nail down the already scarce 52 characters we have for the git commit title to ~48 characters.
  2. Typically, these kind of information (determine if something is a feature, a fix or something else) can be done using Github Labels on either Issues or Pull requests.

One alternative that could solve problem 1, is to add this meta information to the commit body instead. Like so:

package.json: add husky validator

Test husky validator for commit messages.

Closes issue #128283. Type: feat

There's a lot ways of generating automatic changelog. If I had to decide, I'd decide over creating it based on Github Labels of merged Pull Requests. 👍