Skip to content

Commit 9586d0a

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 4656da7 commit 9586d0a

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed

.commitlintrc.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
extends: '@commitlint/config-conventional'
3+
4+
rules:
5+
# See: https://commitlint.js.org/reference/rules.html
6+
#
7+
# Rules are made up by a name and a configuration array. The configuration
8+
# array contains:
9+
#
10+
# * Severity [0..2]: 0 disable rule, 1 warning if violated, or 2 error if
11+
# violated
12+
# * Applicability [always|never]: never inverts the rule
13+
# * Value: value to use for this rule (if applicable)
14+
#
15+
# Run `npx commitlint --print-config` to see the current setting for all
16+
# rules.
17+
#
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Conventional Commits
3+
4+
permissions:
5+
contents: read
6+
7+
on:
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
commit-lint:
14+
name: Verify Conventional Commits
15+
16+
# Skip this job if this is a release PR
17+
if: >-
18+
github.event_name == 'workflow_dispatch' ||
19+
(github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--'))
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with: { fetch-depth: 0 }
27+
28+
- name: Check Commit Messages
29+
uses: wagoid/commitlint-github-action@v6
30+
with: { configFile: .commitlintrc.yml }

release-please-config.json

+15-1
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)