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

[Docs] Fix "Conventional Commit" commit message format #3627

Closed
BinToss opened this issue Jul 18, 2023 · 1 comment · Fixed by #3628
Closed

[Docs] Fix "Conventional Commit" commit message format #3627

BinToss opened this issue Jul 18, 2023 · 1 comment · Fixed by #3628

Comments

@BinToss
Copy link
Contributor

BinToss commented Jul 18, 2023

#### Conventional commit messages
If you want to use the [Conventional Commits][conventional-commits] standard,
you can leverage this feature as follows:
```yaml
mode: MainLine # Only add this if you want every version to be created automatically on your main branch.
major-version-bump-message: "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
minor-version-bump-message: "^(feat)(\\([\\w\\s-]*\\))?:"
patch-version-bump-message: "^(build|chore|ci|docs|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?:"
```
This will ensure that your version gets bumped according to the commits you've
created.

The current Conventional Commit configuration breaks the standard's rules. Where PATCH is supposed to be incremented by only fix or perf, the configuration increments PATCH when the commit Type is any Angular commit Type except feat and no breaking change is present.

Additionally, the following should be noted for consumers:

  • In Conventional Commit 1.0.0, revert-type commits do not explicitly increment the version as their significance differs on a case-by-case basis. The convention gives the following format recommendation:
    revert: let us never again speak of the noodle incident
    
    Refs: 676104e, a215868
    
  • Some software used in tandem with GitVersion may use version-increment rules not present in a given commit convention preset (e.g. angular, conventionalcommits). @semantic-release/commit-analyzer v10.0.1, for example, will increment PATCH for any revert commits regardless of the (in)significance of the reverted changes. This semantic-release behavior can be counteracted by adding custom rules to @semantic-release/commit-analyzer's configuration. Rather than RegEx, commit-analyzer uses Micromatch's glob implementation.
@arturcic arturcic added this to the 6.x milestone Sep 4, 2023
@arturcic arturcic modified the milestones: 6.x, 6.0.0-beta.4 Dec 12, 2023
@arturcic
Copy link
Member

🎉 This issue has been resolved in version 6.0.0-beta.4 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants