Skip to content

Add commitlint configuration and compliance checks - #1038

Open
stv0g wants to merge 1 commit into
masterfrom
commitlint
Open

Add commitlint configuration and compliance checks#1038
stv0g wants to merge 1 commit into
masterfrom
commitlint

Conversation

@stv0g

@stv0g stv0g commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
@stv0g
stv0g requested a review from n-eiling as a code owner July 31, 2026 06:28
@stv0g
stv0g requested a review from leonardocarreras July 31, 2026 06:28

@leonardocarreras leonardocarreras left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @stv0g! I left some comments here, things are a lot matter of preference, so just wanted to help to the choices.

Then there are additionally some small fixes to future-proof, like Node 20 vs newer.

Just as random fact, the PR title does not comply with the new tool, so failing here proved it works :)

run: |
if ! printf '%s\n' "$PR_TITLE" | npx commitlint --verbose; then
echo ""
echo "The pull request title becomes the merge commit subject on master."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you plan to use merge-commits to master? Looks to me that we are using rebase-merge nowadays, at least in the last few PRs I checked

Comment thread .commitlintrc.json
"build",
"chore",
"ci",
"docs",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only docs valid, or also doc makes sense?

Comment thread .commitlintrc.json
"type-enum": [
2,
"always",
[

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some commits in history use cleanup, do we want that added?


- uses: actions/setup-node@v5
with:
node-version: "20"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node 20 is deprecated

node-version: "20"

- name: Install commitlint
run: npm install --no-save @commitlint/cli @commitlint/config-conventional

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also pin this as the same version?

exit 1
fi

- name: Fail if a commit in this branch is not a conventional commit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you may think if you want to use wagoid/commitlint-github-action@v6 to shorten this part, it does this iteration by itself

Comment thread .commitlintrc.json
"sentence-case",
"start-case",
"pascal-case",
"upper-case"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for release-please to pass will be needing an addition in

"release-type": "simple",

something like this might be an option

"pull-request-title-pattern": "chore${scope}: Release${component} ${version}"

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants