ci: enforce Conventional Commits locally via commit-msg hook - #59
Merged
Conversation
Mirrors .github/workflows/conventional-commits.yml's commit-message regex so noncompliant messages are rejected before push instead of failing in CI (the PR-title half of that check still can't run locally, since GitHub only knows the title once the PR exists).
akshaylive
requested review from
bai-uipath,
tmatup and
uipreliga
as code owners
July 27, 2026 22:17
|
Claude finished @akshaylive's task in 1m 27s —— View job PR Review: ci: enforce Conventional Commits locally via commit-msg hookTodo List:
|
bai-uipath
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
commit-msgpre-commit hook (scripts/check_commit_msg.sh) that mirrors the regex in.github/workflows/conventional-commits.yml, rejecting non-conventional commit messages locally before push/CI.default_install_hook_types: [pre-commit, commit-msg]into.pre-commit-config.yamlsomake install/pre-commit installsets up both hook types automatically for everyone.Context: https://github.com/UiPath/coder_eval/actions/runs/30309413197/job/90121301720?pr=58 failed because the PR title/commit message wasn't Conventional-Commits-formatted. The PR-title half of that CI check can't be replicated locally (GitHub only knows the title once the PR exists), but the commit-message half can — and in practice, for single-commit PRs on a squash-merge repo, GitHub defaults the PR title to the commit subject, so keeping commit messages conventional keeps PR titles conventional too.
Test plan
uv run pytest -q— 3741 passed, 10 skipped