Skip to content

Commit 54303d0

Browse files
chore: allow ! to indicate breaking changes (#10430)
* chore: allow `!` to indicate breaking changes * chore: update commit convention too --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 5c90b7f commit 54303d0

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.commitlintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"always",
88
["chore", "build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", "types"]
99
],
10-
"scope-case": [0]
10+
"scope-case": [0],
11+
"subject-exclamation-mark": [0]
1112
}
1213
}

.github/COMMIT_CONVENTION.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Messages must be matched by the following regex:
88

99
```js
10-
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types)(\(.+\))?: .{1,72}/;
10+
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types)(\(.+\))?!?: .{1,72}/;
1111
```
1212

1313
#### Examples
@@ -55,6 +55,7 @@ A commit message consists of a **header**, **body** and **footer**. The header h
5555
```
5656

5757
The **header** is mandatory and the **scope** of the header is optional.
58+
If the commit contains **Breaking Changes**, a `!` can be added before the `:` as an indicator.
5859

5960
### Revert
6061

.github/workflows/pr-triage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
env:
2727
TITLE: ${{ github.event.pull_request.title }}
2828
run: |
29-
REGEX="^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types)(\\(.+\\))?: .{1,72}$"
29+
REGEX="^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types)(\\(.+\\))?!?: .{1,72}$"
3030
3131
echo "Title: \"$TITLE\""
3232

0 commit comments

Comments
 (0)