Repository navigation
fix(git-hooks): fetch the lefthook remote from the installed marketplace - #17554
Conversation
The remote plan named the publisher's git URL from entries.json for every consumer. It now names the git URL of the marketplace the plugin was installed from (a GitHub or git source), so a fork's install fetches the fork; entries.json's URL stays the default otherwise. Refs: #17208 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…he same repository A marketplace added over SSH, or with the repository in another case, named the shipped repository in a different form, so plan offered a second remotes entry beside the one a consumer config already has. That case now keeps the entries.json URL. Refs: #17208 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
Lane run report
Failed GitHub API calls
|
|
claude-review reviewed Code review (incremental): PR #17554, from
|
|
claude-security-review reviewed Security review (incremental, blocking only): no security issues foundThis push changes What I checked:
The earlier non-security note said the PR description promised SSH and letter-case normalization that the code did not have. This push adds that normalization and a test for it. The only prior post was the summary, with no line anchor, and it had no findings to restate. This review was blocking only, so it reports only CRITICAL and IMPORTANT findings. Nothing in this change draws on prepaid credit or can cause a charge. critical-findings: 0 |
Refs: #17208
Summary
The 11 plugins that ship git hooks name this publisher's repository as their lefthook remote in
git-hooks/entries.json, and the remote plan wrote that URL into every consumer's lefthook config, which lefthook refetches hourly. A consumer that installed a fork's marketplace still fetched the publisher's repository (#17208).Fix
lib/git-hooks/install.mjs:loadPlugintakes the remote'sgit_urlfrom the marketplace the plugin was installed from, read fromknown_marketplaces.jsonbeside the plugin cache (the filemarketplaceClonealready reads): agithubsource becomeshttps://github.com/<repo>, agitsource itsurlwithout a trailing.git. A plugin not installed from a marketplace cache, or one whose marketplace has another source type, keeps theentries.jsonURL, which stays the shipped default.git@host:owner/repoURL, another letter case, a trailing slash) keeps theentries.jsonURL, so a consumer's lefthook config that already names it still matches and plan offers no secondremotes:entry.entries.jsonnames either the derived URL or the shipped default, so a fork's aggregate still finds its other plugins.git-hook-decisions.mdsays which URL the snippet names. Both files are regenerated into the 11 carrying plugins byscripts/sync-shared-copies.sh.Verification
node --test lib/git-hooks/install.test.mjs: 256 tests, 252 pass, 0 fail, 4 skipped. Two new tests: the snippet names the GitHub and git marketplace URLs and falls back toentries.jsonfor a directory source, a malformed repo and no record, and keeps it for the shipped repository given over SSH or in another case, while a fork's SSH URL stays as given; a consumer entry naming the derived URL counts as the plugin's remote (nolefthook-configdecision).scripts/sync-shared-copies.sh --checkand--check-bump origin/main: clean.scripts/check-changelog-fragments.sh --check: all fragments valid.Remaining
What #17208 still needs after this PR:
block-lane-pr-disable-auto.sh), in its own PR.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd