pull-request-name-linter-action
pull-request-name-linter-action copied to clipboard
`Error: RangeError: Found invalid rule names: header-trim`
trafficstars
A CI job for my PR started suddenly failing with the error:
Run JulienKode/[email protected]
Error: RangeError: Found invalid rule names: header-trim. Supported rule names are: body-case, body-empty, body-full-stop, body-leading-blank, body-max-length, body-max-line-length, body-min-length, footer-empty, footer-leading-blank, footer-max-length, footer-max-line-length, footer-min-length, header-case, header-full-stop, header-max-length, header-min-length, references-empty, scope-case, scope-empty, scope-enum, scope-max-length, scope-min-length, signed-off-by, subject-case, subject-empty, subject-full-stop, subject-max-length, subject-min-length, subject-exclamation-mark, trailer-exists, type-case, type-empty, type-enum, type-max-length, type-min-length
Error: Found invalid rule names: header-trim. Supported rule names are: body-case, body-empty, body-full-stop, body-leading-blank, body-max-length, body-max-line-length, body-min-length, footer-empty, footer-leading-blank, footer-max-length, footer-max-line-length, footer-min-length, header-case, header-full-stop, header-max-length, header-min-length, references-empty, scope-case, scope-empty, scope-enum, scope-max-length, scope-min-length, signed-off-by, subject-case, subject-empty, subject-full-stop, subject-max-length, subject-min-length, subject-exclamation-mark, trailer-exists, type-case, type-empty, type-enum, type-max-length, type-min-length
I hadn't changed my PR's title before and it's been passing for weeks. Then it started failing for no apparent reason. (I at first tried to shorten my PR title thinking that that was the issue but after reading the error better I realized there's more to it...)
here's my pr-linting.yaml
name: PR linting
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
jobs:
lint-pr-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: npm install @commitlint/config-conventional
- uses: JulienKode/[email protected]
and my PR title is
feat(patch-detail): implement new view with in-depth patch info
The following workaround fixed it for me:
name: PR linting
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
jobs:
lint-pr-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
- run: npm install @commitlint/config-conventional
+ run: npm install @commitlint/config-conventional@v17
- uses: JulienKode/[email protected]
A new rule was introduced in v18.6 https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md#1860-2024-01-25