Skip to content

feat: add mix githooks.install to activate the repo's git hooks - #51

Merged
bougyman merged 1 commit into
mainfrom
issue-50
Aug 10, 2026
Merged

feat: add mix githooks.install to activate the repo's git hooks#51
bougyman merged 1 commit into
mainfrom
issue-50

Conversation

@bougyman

Copy link
Copy Markdown
Member

Summary

Closes #50.

githooks/commit-msg exists and correctly calls ci/validate_conventional_commit.sh, but core.hooksPath was never actually configured on any local clone - the hook never fired, which is how fix!(docs)/docs!(licence) (wrong ! position) got committed without ever being caught before push.

Adds mix githooks.install (git config core.hooksPath githooks) and mentions it in the Readme's Development section so it's actually discoverable.

Related: main now also requires the Test and Validate Commit Subjects checks to pass before merge, with no admin override - so even if the local hook is skipped, CI backstops it.

Test plan

  • mix test - 182 passed
  • mix format --check-formatted - clean
  • Ran mix githooks.install for real, then fed a malformed subject (fix!(docs): ...) through the now-active githooks/commit-msg hook directly - correctly rejected
  • asciidoctor -o /dev/null Readme.adoc renders clean

🤖 Generated with Claude Code

githooks/commit-msg exists and correctly calls
ci/validate_conventional_commit.sh, but core.hooksPath was never
actually configured on any local clone - the hook never fired, which
is how fix!(docs)/docs!(licence) (wrong ! position) got committed
without ever being caught before push. Adds `mix githooks.install`
(git config core.hooksPath githooks) and mentions it in the Readme's
Development section.

Closes #50.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 10, 2026 02:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a discoverable, repo-local way to activate the existing githooks/commit-msg hook so Conventional Commit subject enforcement runs on contributors’ machines (not only in CI), addressing the gap where core.hooksPath was never set by default.

Changes:

  • Introduces mix githooks.install, which configures git config core.hooksPath githooks at the repository root.
  • Updates the Development section in Readme.adoc to instruct contributors to run the new task.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Readme.adoc Documents how to activate the repo’s git hooks via the new Mix task.
app/lib/mix/tasks/githooks.install.ex Adds a Mix task that sets core.hooksPath to githooks for the current clone.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/lib/mix/tasks/githooks.install.ex
@bougyman
bougyman merged commit 9b35472 into main Aug 10, 2026
3 checks passed
@bougyman
bougyman deleted the issue-50 branch August 10, 2026 02:35
bougyman pushed a commit that referenced this pull request Aug 10, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.8.2](v0.8.1...v0.8.2)
(2026-08-10)


### Features

* add mix githooks.install to activate the repo's git hooks
([#51](#51))
([9b35472](9b35472))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

Add a mix task to activate githooks (core.hooksPath was never actually set)

2 participants