Github PR (Pull-Request) Title Prefix Rule (Optional)

It’s recommended that each pull-request give a commit message with a pre-defined prefix, this should be an optional rule.

- feat:     A new feature
- fix:      A bug fix
- docs:     Documentation only changes
- style:    Formatting, missing semi-colons, white-space, etc
- refactor: A code change that neither fixes a bug nor adds a feature
- perf:     A code change that improves performance
- test:     Adding missing tests
- chore:    Maintain. Changes to the build process or auxiliary tools/libraries/documentation

These prefix are part of Angular.js commit message conventions, and you can take a look at their practice in Angular.js github project.

In Grin project, there’s no need to fully follow Angular.js commit message conventions. We just need use these prefixes in each pull-request’s title, that’s all, it’s very simple but with several benefits:

  1. It’s very clear to know the type of each PR.
  2. Since the PR title is also the git commit message title after it’s merged, it will be very neat when read the git log.
  3. We’re doing the binary auto-releasing (check PR #1540 for the detail), and it is using automatic change log generating function, thanks to github-changelog-generator. These change logs are fully automated generated, and this generator heavily rely on the Github *issues and pull requests, so for achieving a neat change log on each release, we need define some simple rules for them.

At the end, regarding Template :

  • Perhaps a simple pull-request template can be set as default in Github, after this proposal is fully reviewed and agree, I will research it later.

Welcome your comments and proposals ~

Updated at 25th Sep.

  • remove the convention proposal regarding to “Fixed” and “Closed” message, looking @antioch comment, and we should stick with github conventions on this part, as this will link issues and PRs and close them as automatically.
1 Like

We should stick with the github conventions as this will link issues and PRs and close them as automatically.

Specifically the syntax for linking multiple issues (which I always mess up) -

To close multiple issues, preface each issue reference with one of the above keywords. You must use the keyword before each issue you reference for the keyword to work.

For example, This closes #34, closes #23, and closes example_user/example_repo#42 would close issues #34 and #23 in the same repository, and issue #42 in the “example_user/example_repo” repository.


@antioch :+1: Yay! I learn a new skill :smile: