Skip to content

Conversation

@jd
Copy link
Member

@jd jd commented Jan 25, 2026

Change git hook installation to use importlib.resources.as_file()
context manager for copying resources. This ensures compatibility
with zip/PEX-style package installations where resources aren't
directly accessible as filesystem paths.

  • Rename _get_script_resource_path() to _get_script_resource()
    returning Traversable instead of str
  • Add _get_wrapper_resource() helper
  • Update _script_needs_update() to accept Traversable
  • Use as_file() context manager in _install_git_hook() and
    ensure_hooks_updated()

This makes git hook handling consistent with Claude hook handling
which already uses as_file().

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

@jd
Copy link
Member Author

jd commented Jan 25, 2026

This pull request is part of a stack:

  1. refactor(stack): use as_file() for package resource copying (#937) 👈

@mergify
Copy link
Contributor

mergify bot commented Jan 25, 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 25, 2026

🧪 CI Insights

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

🟢 All jobs passed!

But CI Insights is watching 👀

@mergify mergify bot requested a review from a team January 25, 2026 15:36
remyduthu
remyduthu previously approved these changes Jan 26, 2026
@jd jd force-pushed the devs/jd/version-hooks/I565f0651b22e1cc13c66015638df799796d7e819 branch from 5bf5d8b to b99cacb Compare January 26, 2026 12:53
@jd jd force-pushed the devs/jd/version-hooks/I0a5ac49101c080fc9cee0ee84fae84c43ec28a64 branch from 1afef78 to a8eec96 Compare January 26, 2026 12:53
@mergify mergify bot dismissed remyduthu’s stale review January 26, 2026 12:53

Pull request has been modified.

@mergify mergify bot had a problem deploying to Mergify Merge Protections January 26, 2026 12:53 Failure
@mergify mergify bot requested a review from a team January 26, 2026 12:55
@jd jd force-pushed the devs/jd/version-hooks/I565f0651b22e1cc13c66015638df799796d7e819 branch from b99cacb to d31a4b9 Compare January 26, 2026 13:13
@jd jd force-pushed the devs/jd/version-hooks/I0a5ac49101c080fc9cee0ee84fae84c43ec28a64 branch from a8eec96 to 173c3d4 Compare January 26, 2026 13:13
@mergify mergify bot had a problem deploying to Mergify Merge Protections January 26, 2026 13:13 Failure
@jd jd force-pushed the devs/jd/version-hooks/I565f0651b22e1cc13c66015638df799796d7e819 branch from d31a4b9 to 9be7898 Compare January 26, 2026 15:57
@jd jd force-pushed the devs/jd/version-hooks/I0a5ac49101c080fc9cee0ee84fae84c43ec28a64 branch from 173c3d4 to 26479bc Compare January 26, 2026 15:57
@mergify mergify bot had a problem deploying to Mergify Merge Protections January 26, 2026 15:57 Failure
@jd jd force-pushed the devs/jd/version-hooks/I565f0651b22e1cc13c66015638df799796d7e819 branch from 9be7898 to 67a94f2 Compare January 27, 2026 09:31
@jd jd force-pushed the devs/jd/version-hooks/I0a5ac49101c080fc9cee0ee84fae84c43ec28a64 branch from 26479bc to 1509d9b Compare January 27, 2026 09:31
@mergify mergify bot had a problem deploying to Mergify Merge Protections January 27, 2026 09:31 Failure
Base automatically changed from devs/jd/version-hooks/I565f0651b22e1cc13c66015638df799796d7e819 to main January 27, 2026 09:44
@mergify
Copy link
Contributor

mergify bot commented Jan 27, 2026

@jd this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Jan 27, 2026
Change git hook installation to use importlib.resources.as_file()
context manager for copying resources. This ensures compatibility
with zip/PEX-style package installations where resources aren't
directly accessible as filesystem paths.

- Rename _get_script_resource_path() to _get_script_resource()
  returning Traversable instead of str
- Add _get_wrapper_resource() helper
- Update _script_needs_update() to accept Traversable
- Use as_file() context manager in _install_git_hook() and
  ensure_hooks_updated()

This makes git hook handling consistent with Claude hook handling
which already uses as_file().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change-Id: I0a5ac49101c080fc9cee0ee84fae84c43ec28a64
Claude-Session-Id: 3dabd187-059b-40b7-9a52-a2542a27c752
@jd jd force-pushed the devs/jd/version-hooks/I0a5ac49101c080fc9cee0ee84fae84c43ec28a64 branch from 1509d9b to 82b0e00 Compare January 27, 2026 09:47
@mergify mergify bot removed the conflict label Jan 27, 2026
@mergify mergify bot deployed to Mergify Merge Protections January 27, 2026 09:47 Active
@mergify mergify bot merged commit 60d2b3f into main Jan 27, 2026
18 checks passed
@mergify mergify bot deleted the devs/jd/version-hooks/I0a5ac49101c080fc9cee0ee84fae84c43ec28a64 branch January 27, 2026 09:51
@mergify
Copy link
Contributor

mergify bot commented Jan 27, 2026

Merge Queue Status

✅ The pull request has been merged at 82b0e00

This pull request spent 8 seconds in the queue, including 1 second running CI.
The checks were run in-place.

Required conditions to merge

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