Skip to content
This repository was archived by the owner on Sep 13, 2026. It is now read-only.

[CTX-0015] fix(dev-tooling): commitlint must accept carryctx [CTX-XXXX] prefix - #22

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-0015/fix-commitlint-ctx-prefix
Sep 11, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-0015/fix-commitlint-ctx-prefix

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

CarryCtx's prepare-commit-msg hook prepends [CTX-XXXX] to every commit, but @commitlint/config-conventional rejected the resulting header, forcing --no-verify. This change accepts an optional [CTX-XXXX] prefix through a parserPreset header pattern while keeping conventional type/scope/subject enforcement intact.

Priority: P1 | Area: devtools | Labels: fix,area:devtools,P1 | Milestone: v0.1.0 | RFC: none | Task: CTX-0015

Changes

  • commitlint.config.ts: add parserPreset.parserOpts.headerPattern/headerCorrespondence accepting an optional [CTX-\d+] prefix. Parser options from @commitlint/config-conventional are merged, not replaced.

Evidence (commitlint@21.2.2)

subject before after
[CTX-0015] chore: x exit 1 exit 0
chore: x exit 0 exit 0
chore x exit 1 exit 1
[CTX-0015] foo: x exit 1 exit 1 (type-enum)
[CTX-0015] chore: Subject. exit 1 exit 1 (subject-full-stop, subject-case)

End-to-end: the fix commit message carries the CarryCtx [CTX-0015] prefix and passes just commit-check.

just check passes (markdownlint, prettier).

Closes #21

…X] prefix

Allow an optional [CTX-XXXX] prefix prepended by the CarryCtx
prepare-commit-msg hook, while keeping conventional type, scope,
and subject enforcement intact.
@Xuepoo Xuepoo added this to the v0.1.0 milestone Sep 11, 2026
@Xuepoo Xuepoo added P1 High priority area:devtools Developer tooling fix Bug fix labels Sep 11, 2026
@Xuepoo
Xuepoo merged commit baa098c into main Sep 11, 2026
5 checks passed
@Xuepoo
Xuepoo deleted the ctx-0015/fix-commitlint-ctx-prefix branch September 11, 2026 01:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area:devtools Developer tooling fix Bug fix P1 High priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(dev-tooling): commitlint must accept carryctx [CTX-XXXX] prefix

1 participant