Skip to content

Commit bc141c7

Browse files
committed
build: configure release-please to includes all changes in the CHANGELOG
There are two changes made to the release-please config: (1) all change types will be show where many where hidden before (2) the change types that were hidden before are grouped into a section called "Other Changes" Also the supported conventions commit change types are explicitly listed in the commitlintrc.yml so we can ensure that they align with the release-please configuration.
1 parent df7911b commit bc141c7

File tree

3 files changed

+47
-7
lines changed

3 files changed

+47
-7
lines changed

.commitlintrc.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,34 @@ extends: '@commitlint/config-conventional'
44
rules:
55
# See: https://commitlint.js.org/reference/rules.html
66
#
7-
# Rules are made up by a name and a configuration array. The configuration array contains:
7+
# Rules are made up by a name and a configuration array. The configuration
8+
# array contains:
89
#
9-
# * Severity [0..2]: 0 disable rule, 1 warning if violated, or 2 error if violated
10+
# * Severity [0..2]: 0 disable rule, 1 warning if violated, or 2 error if
11+
# violated
1012
# * Applicability [always|never]: never inverts the rule
11-
# * Value: value to use for this rule
13+
# * Value: value to use for this rule (if applicable)
1214
#
13-
# Run `npx commitlint --print-config` to see the current setting for all rules.
15+
# Run `npx commitlint --print-config` to see the current setting for all
16+
# rules.
1417
#
15-
body-leading-blank: [2, 'always']
16-
footer-leading-blank: [2, 'always']
18+
header-max-length: [2, always, 100] # Header can not exceed 100 chars
19+
20+
type-case: [2, always, lower-case] # Type must be lower case
21+
type-empty: [2, never] # Type must not be empty
22+
23+
# Supported conventional commit types
24+
type-enum: [2, always, [build, ci, chore, docs, feat, fix, perf, refactor, revert, style, test]]
25+
26+
scope-case: [2, always, lower-case] # Scope must be lower case
27+
28+
# Error if subject is one of these cases (encourages lower-case)
29+
subject-case: [2, never, [sentence-case, start-case, pascal-case, upper-case]]
30+
subject-empty: [2, never] # Subject must not be empty
31+
subject-full-stop: [2, never, "."] # Subject must not end with a period
32+
33+
body-leading-blank: [2, always] # Body must have a blank line before it
34+
body-max-line-length: [2, always, 100] # Body lines can not exceed 100 chars
35+
36+
footer-leading-blank: [2, always] # Footer must have a blank line before it
37+
footer-max-line-length: [2, always, 100] # Footer lines can not exceed 100 chars

.github/workflows/enforce_conventional_commits.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
---
12
name: Conventional Commits
23

4+
permissions:
5+
contents: read
6+
37
on:
48
pull_request:
59
branches:
@@ -9,6 +13,7 @@ jobs:
913
commit-lint:
1014
name: Verify Conventional Commits
1115

16+
# Skip this job if this is a release PR
1217
if: >-
1318
github.event_name == 'workflow_dispatch' ||
1419
(github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--'))

release-please-config.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,21 @@
1010
"bump-patch-for-minor-pre-major": true,
1111
"draft": false,
1212
"prerelease": false,
13-
"include-component-in-tag": false
13+
"include-component-in-tag": false,
14+
"pull-request-title-pattern": "chore: release v${version}",
15+
"changelog-sections": [
16+
{ "type": "feat", "section": "Features", "hidden": false },
17+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
18+
{ "type": "build", "section": "Other Changes", "hidden": false },
19+
{ "type": "chore", "section": "Other Changes", "hidden": false },
20+
{ "type": "ci", "section": "Other Changes", "hidden": false },
21+
{ "type": "docs", "section": "Other Changes", "hidden": false },
22+
{ "type": "perf", "section": "Other Changes", "hidden": false },
23+
{ "type": "refactor", "section": "Other Changes", "hidden": false },
24+
{ "type": "revert", "section": "Other Changes", "hidden": false },
25+
{ "type": "style", "section": "Other Changes", "hidden": false },
26+
{ "type": "test", "section": "Other Changes", "hidden": false }
27+
]
1428
}
1529
},
1630
"plugins": [

0 commit comments

Comments
 (0)