Skip to content

feat: make maximum subject length configurable#27

Merged
benner merged 2 commits into
mainfrom
feat/configurable-max-subject-length
Apr 23, 2026
Merged

feat: make maximum subject length configurable#27
benner merged 2 commits into
mainfrom
feat/configurable-max-subject-length

Conversation

@benner
Copy link
Copy Markdown
Owner

@benner benner commented Apr 23, 2026

The 72-character limit suits most projects but some (monorepos, tooling
repos) benefit from a higher limit. --max-subject-length replaces the
default when set, so projects can enforce the length that fits their
convention.

Supported via --max-subject-length CLI flag and max-subject-length key
in .commit-guard.toml; CLI takes precedence over config.

benner added 2 commits April 23, 2026 17:34
Decouples the function from the global MAX_SUBJECT_LEN constant so
callers can pass a custom limit. Defaults to MAX_SUBJECT_LEN to
preserve existing behaviour.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
The 72-character limit suits most projects but some (monorepos, tooling
repos) benefit from a higher limit. --max-subject-length replaces the
default when set, so projects can enforce the length that fits their
convention.

Supported via --max-subject-length CLI flag and max-subject-length key
in .commit-guard.toml; CLI takes precedence over config.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
@benner benner marked this pull request as ready for review April 23, 2026 14:39
@benner benner merged commit 3ec6ef3 into main Apr 23, 2026
4 checks passed
@benner benner deleted the feat/configurable-max-subject-length branch April 23, 2026 14:41
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.

1 participant