You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The commit conventions enforced by commitlint (conventional) were different than the conventions used by the semantic-release (angular). In practice, is was never a problem as they are pretty similar, but it's better to be consistent anyways. Update the commit conventions documentation according to the change and also extend it with the information about which kind of release is triggered by which commit type. Add explicit configuration for release rules for semantic-release to the configuration file - rules are the same as before, but now it is easier to see what they actually are.
Copy file name to clipboardExpand all lines: docs/dev/06-git-commit-msg.md
+20-23Lines changed: 20 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,18 @@
2
2
showInMenu: false
3
3
---
4
4
5
+
In the repository we use and enforce the commit message conventions. The conventions are verified using [commitlint] with [Angular config](https://www.npmjs.com/package/@commitlint/config-angular).
6
+
5
7
## The reasons for these conventions:
6
8
- automatic generating of the changelog
7
9
- simple navigation through git history (e.g. ignoring style changes)
8
10
9
11
## Format of the commit message:
10
12
```bash
11
13
<type>(<scope>): <subject>
12
-
14
+
<BLANK LINE>
13
15
<body>
14
-
16
+
<BLANK LINE>
15
17
<footer>
16
18
```
17
19
@@ -27,19 +29,18 @@ Fixes #2310
27
29
```
28
30
29
31
## Message subject (first line)
30
-
The first line cannot be longer than 70 characters, the second line is always blank and
31
-
other lines should be wrapped at 80 characters. The type and scope should
32
-
always be lowercase as shown below.
32
+
The first line cannot be longer than 72 characters and should be followed by a blank line. The type and scope should always be lowercase as shown below.
33
33
34
34
### Allowed `<type>` values:
35
35
36
-
***feat** (new feature for the user, not a new feature for build script)
37
-
***fix** (bug fix for the user, not a fix to a build script)
38
-
***docs** (changes to the documentation)
39
-
***style** (formatting, missing semi colons, etc; no production code change)
40
-
***refactor** (refactoring production code, eg. renaming a variable)
41
-
***test** (adding missing tests, refactoring tests; no production code change)
42
-
***chore** (updating grunt tasks etc; no production code change)
36
+
***feat** for a new feature for the user, not a new feature for build script. Such commit will trigger a release bumping a MINOR version.
37
+
***fix** for a bug fix for the user, not a fix to a build script. Such commit will trigger a release bumping a PATCH version.
38
+
***perf** for performance improvements. Such commit will trigger a release bumping a PATCH version.
39
+
***docs** for changes to the documentation.
40
+
***style** for formatting changes, missing semicolons, etc.
41
+
***refactor** for refactoring production code, e.g. renaming a variable.
42
+
***test** for adding missing tests, refactoring tests; no production code change.
43
+
***build** for updating build configuration, development tools or other changes irrelevant to the user.
43
44
44
45
### Example `<scope>` values:
45
46
@@ -55,16 +56,9 @@ The `<scope>` can be empty (e.g. if the change is a global or difficult
55
56
to assign to a single component), in which case the parentheses are
56
57
omitted. In smaller projects such as Karma plugins, the `<scope>` is empty.
57
58
58
-
59
59
## Message body
60
-
* uses the imperative, present tense: “change” not “changed” nor “changes”
61
-
* includes motivation for the change and contrasts with previous behavior
Just as in the `<subject>`, use the imperative, present tense: "change" not "changed" nor "changes". Message body should include motivation for the change and contrasts with previous behavior.
68
62
69
63
## Message footer
70
64
@@ -91,10 +85,13 @@ To migrate your project, change all the commands, where you use `--port-runner`
91
85
to `--runner-port`.
92
86
```
93
87
88
+
Any commit with the breaking change section will trigger a MAJOR release and appear on the changelog independently of the commit type.
89
+
94
90
---
95
91
96
-
This document is based on [AngularJS Git Commit Msg Convention]. See the
97
-
[commit history] for examples of properly-formatted commit messages.
92
+
This document is based on [Angular Commit Message Format]. See the [commit history] for examples of properly-formatted commit messages.
Copy file name to clipboardExpand all lines: release.config.js
+21-1Lines changed: 21 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,5 +20,25 @@ module.exports = {
20
20
success: [
21
21
'@semantic-release/github',
22
22
'./tools/update-docs'
23
-
]
23
+
],
24
+
25
+
// The release rules determine what kind of release should be triggered
26
+
// based on the information included in the commit message. The default
27
+
// rules used by semantic-release are the same, but they are set explicitly
28
+
// for better visibility.
29
+
// See https://github.com/semantic-release/commit-analyzer/blob/master/lib/default-release-rules.js
30
+
releaseRules: [
31
+
{breaking: true,release: 'major'},
32
+
{revert: true,release: 'patch'},
33
+
{type: 'feat',release: 'minor'},
34
+
{type: 'fix',release: 'patch'},
35
+
{type: 'perf',release: 'patch'}
36
+
],
37
+
38
+
// The preset determines which commits are included in the changelog and how
39
+
// the changelog is formatted. The default value used by semantic-release is
40
+
// the same, but it is set explicitly for visibility.
41
+
// See https://semantic-release.gitbook.io/semantic-release/#commit-message-format
42
+
// See https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular
0 commit comments