fix(is-ignored): strip CI skip markers from release commits#4637
Conversation
Semantic-release commits with CI skip markers like [skip ci], [ci skip], [skip-ci], [ci-skip] should be ignored to prevent false positives when linting automated release commits.
Review Summary by QodoStrip CI skip markers from semantic-release commits
WalkthroughsDescription• Strip CI skip markers from release commits before semver validation • Support bracket and parenthesis variants of CI skip markers • Add comprehensive test coverage for CI skip marker scenarios Diagramflowchart LR
A["Commit message with CI skip marker"] -->|Remove chore prefix| B["Extract version string"]
B -->|Strip bracket markers| C["Remove [skip ci] variants"]
C -->|Strip parenthesis markers| D["Remove (skip ci) variants"]
D -->|Validate semver| E["Pass validation"]
File Changes1. @commitlint/is-ignored/src/defaults.ts
|
Code Review by Qodo
1. Unanchored marker stripping
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
|
Any idea why the checks are not running? I wonder if this is related to "ci skip" in the title |
|
Maybe. That commit title is too long anyway, @Br1an67 you could rename it just to "fix(is-ignored): add semver markers for skipping ci" |
56a6fd0
into
conventional-changelog:master
Fixes #4594
Description
This PR fixes the issue where semantic-release commits containing CI skip markers were not being properly ignored by commitlint. The
isSemverfunction in@commitlint/is-ignorednow strips common CI skip markers before validating the version string.Motivation and Context
Automated release tools like semantic-release often include CI skip markers (e.g.,
[skip ci],[ci skip]) in commit messages to prevent triggering duplicate CI pipelines. However, these markers were causing the semver validation to fail, resulting in false positives when linting legitimate automated release commits.Example commit that was incorrectly flagged:
Usage examples
How Has This Been Tested?
@commitlint/is-ignoredpassTypes of changes
Checklist: