Skip to content

refactor(stack): install Claude hooks globally#925

Merged
mergify[bot] merged 1 commit intomainfrom
devs/jd/version-hooks/I3c458313822df489627119561bcc84572c5e9873
Jan 22, 2026
Merged

refactor(stack): install Claude hooks globally#925
mergify[bot] merged 1 commit intomainfrom
devs/jd/version-hooks/I3c458313822df489627119561bcc84572c5e9873

Conversation

@jd
Copy link
Member

@jd jd commented Jan 22, 2026

Move Claude hooks from per-project to global installation:

  • Scripts: ~/.config/mergify-cli/claude-hooks/
  • Settings: ~/.claude/settings.json

This eliminates the need for per-project gitignore handling
and ensures hooks work across all projects automatically.

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Copilot AI review requested due to automatic review settings January 22, 2026 09:44
@mergify mergify bot had a problem deploying to Mergify Merge Protections January 22, 2026 09:44 Failure
@jd
Copy link
Member Author

jd commented Jan 22, 2026

This pull request is part of a stack:

  1. refactor(stack): install Claude hooks globally (#925) 👈
  2. feat(stack): add git hooks with sourcing architecture (#926)

@mergify
Copy link
Contributor

mergify bot commented Jan 22, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

Wonderful, this rule succeeded.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify
Copy link
Contributor

mergify bot commented Jan 22, 2026

🧪 CI Insights

Here's what we observed from your CI run for ca34ab5.

🟢 All jobs passed!

But CI Insights is watching 👀

@mergify mergify bot requested a review from a team January 22, 2026 09:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors Claude hook installation from a per-project to a global approach. Instead of installing hooks in each project's .claude/ directory, the hooks are now installed once in the user's home directory, eliminating the need for per-project gitignore handling and ensuring hooks work consistently across all projects.

Changes:

  • Moved Claude hook scripts to ~/.config/mergify-cli/claude-hooks/
  • Moved Claude settings to ~/.claude/settings.json (global)
  • Changed _install_claude_hooks() from async to sync function
  • Removed claude_hooks/settings.json file (settings now constructed in code)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
mergify_cli/stack/setup.py Refactored Claude hooks installation to use global paths; added helper functions for paths; updated import from importlib.metadata to importlib.resources; removed per-project logic
mergify_cli/stack/claude_hooks/settings.json Removed settings template file as configuration is now built dynamically in code with absolute paths

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jd jd marked this pull request as draft January 22, 2026 10:15
@jd jd marked this pull request as ready for review January 22, 2026 10:34
Move Claude hooks from per-project to global installation:
- Scripts: ~/.config/mergify-cli/claude-hooks/
- Settings: ~/.claude/settings.json

This eliminates the need for per-project gitignore handling
and ensures hooks work across all projects automatically.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change-Id: I3c458313822df489627119561bcc84572c5e9873
Claude-Session-Id: 5f1a97a3-70f4-4099-8edf-810289af8151
@jd jd force-pushed the devs/jd/version-hooks/I3c458313822df489627119561bcc84572c5e9873 branch from 54ab5d6 to ca34ab5 Compare January 22, 2026 12:49
@mergify mergify bot deployed to Mergify Merge Protections January 22, 2026 12:50 Active
Copy link
Contributor

@remyduthu remyduthu left a comment

Choose a reason for hiding this comment

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

Better I think

@mergify mergify bot merged commit fbc2b64 into main Jan 22, 2026
18 checks passed
@mergify
Copy link
Contributor

mergify bot commented Jan 22, 2026

Merge Queue Status

✅ The pull request has been merged at ca34ab5

This pull request spent 5 seconds in the queue, with no time running CI.
The checks were run in-place.

Required conditions to merge

@mergify mergify bot deleted the devs/jd/version-hooks/I3c458313822df489627119561bcc84572c5e9873 branch January 22, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants