Skip to content

chore(root): add commitlint as a husky commit-msg hook#8471

Merged
zahin-mohammad merged 2 commits intomasterfrom
zahinmohammad/wal-565-setup-commitlint-as-a-pre-commit-hook-in-nix-backport-from
Apr 10, 2026
Merged

chore(root): add commitlint as a husky commit-msg hook#8471
zahin-mohammad merged 2 commits intomasterfrom
zahinmohammad/wal-565-setup-commitlint-as-a-pre-commit-hook-in-nix-backport-from

Conversation

@zahin-mohammad
Copy link
Copy Markdown
Contributor

@zahin-mohammad zahin-mohammad commented Apr 10, 2026

Summary

  • Adds a .husky/commit-msg hook that runs yarn check-commits (commitlint) on every commit
  • Enforces conventional commit format locally — malformed messages are rejected at commit time instead of only failing in CI
  • Mirrors the behavior already in place in bitgo-microservices

Test plan

  • Run yarn install to ensure Husky hooks are installed
  • Attempt a commit with a non-conventional message (e.g. git commit --allow-empty -m "bad message") — rejected by commitlint
  • Attempt a commit with a valid conventional message (e.g. fix(root): test message WAL-565) — passes

Ticket: WAL-565

Add pre-commit-hooks.nix input and configure commitlint on the
commit-msg stage, mirroring the setup in bitgo-microservices. Entering
the nix dev shell now installs the hook automatically so commit messages
are validated locally without manual setup.

WAL-565
@linear
Copy link
Copy Markdown

linear bot commented Apr 10, 2026

Add a commit-msg husky hook that runs `yarn check-commits` to validate
commit messages locally. This ensures conventional commit format is
enforced before commits are pushed, for all developers regardless of
their shell setup.

Reverts the nix-specific pre-commit-hooks approach in favor of the
simpler husky-based hook which works universally after `yarn install`.

WAL-565
@zahin-mohammad zahin-mohammad changed the title chore(root): setup commitlint as a nix pre-commit hook chore(root): add commitlint as a husky commit-msg hook Apr 10, 2026
@zahin-mohammad zahin-mohammad marked this pull request as ready for review April 10, 2026 03:00
@zahin-mohammad zahin-mohammad requested review from a team as code owners April 10, 2026 03:00
@zahin-mohammad zahin-mohammad merged commit b28bbf2 into master Apr 10, 2026
21 checks passed
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.

3 participants