Skip to content

Commit

Permalink
ci: Update commitlint hook
Browse files Browse the repository at this point in the history
Use a better working third party hook, and extend from the upstream
conventional commits config. This allows commitlint to properly parse
subject lines with a breaking change indicator (`!`).

This hook is already successfully in use in
<https://github.com/DSD-DBS/capella-collab-manager>.
  • Loading branch information
Wuestengecko committed Jul 11, 2024
1 parent 509984d commit 9091530
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# SPDX-FileCopyrightText: Copyright DB InfraGO AG
# SPDX-License-Identifier: CC0-1.0

extends:
- '@commitlint/config-conventional'
rules:
body-leading-blank: [2, always]
footer-leading-blank: [2, always]
Expand Down
10 changes: 3 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,10 @@ repos:
rev: 7d19244ab46b6a125d1a4dbe4a3ebb9ca767ab1a
hooks:
- id: reuse
- repo: local # commitlint
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.16.0
hooks:
- id: commitlint
name: commitlint
entry: commitlint -e
language: node
stages: [commit-msg]
pass_filenames: false
always_run: true
additional_dependencies:
- "@commitlint/cli"
- '@commitlint/config-conventional'

0 comments on commit 9091530

Please sign in to comment.