hook-manager: register managers that need no install fix (simple-git-hooks, cargo-husky, Maven plugins)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- git, java, javascript, python, rust
- Ambito
- developer-experience, documentation, tooling
Direzione di ricerca
Start with the hook-manager contract in tools/hook-manager/README.md, then inspect tools/dev/sync-hook-managers.py and its registry. Check the linked-worktree behavior and generated Maven hook scripts, then confirm each manager by installing it and making a commit that runs its hook. Done means the registry, adapter table, and docs/setup/secure-agent-setup.md cover the confirmed managers and caveats, with the stated checks passing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The hook-manager contract (#1819) defines how the secure agent setup integrates a git-hook manager: where its install puts the hook, how its home is split between sandboxed and host runs, and how the setup detects that a repository uses it.
Several managers already install into the repository's own hooks dir whatever the global core.hooksPath says, so they need no install fix, only a registry entry (install.strategy: none, which the contract lists as planned) and documentation.
This issue covers them.
What the source says
- simple-git-hooks 2.14.0 (JavaScript). Reads only
git config --local core.hooksPath, else<common dir>/hooks, with worktreecommondirresolution (simple-git-hooks.js:60-96, 246-266). It ignores the global value, so it already lands where the dispatcher chains.
Runs from the packagepostinstall. It overwrites an existing hook without a backup (:292-303). Skip install:SKIP_INSTALL_SIMPLE_GIT_HOOKS; skip hooks:SKIP_SIMPLE_GIT_HOOKS=1. No home. Config: asimple-git-hookskey inpackage.json, or.simple-git-hooks.{js,cjs,json}/simple-git-hooks.{js,cjs,json}(confirm the list). - cargo-husky v1.0.1 (Rust). A
build.rsin a dev-dependency walks up fromOUT_DIRto.gitand writes<gitdir>/hooks(build.rs:49-73, 154-164), ignoringcore.hooksPath.
It does not handle a.gitfile, so it fails withGitDirNotFoundin a linked worktree, and aCARGO_TARGET_DIRoutside the repository breaks it too. Never touches a foreign hook. No home of its own. - Maven: git-build-hook 3.6.0 and git-code-format-maven-plugin 1.25 (Java). Both write JGit's
getGitDir()/hooksand ignorecore.hooksPath.
git-build-hook'sconfiguregoal can write any repository config key (GitConfigMojo.java),core.hooksPathincluded, which bypasses the dispatcher the same way husky does.
Not yet checked: JGit's behaviour in a linked worktree, and the generated hook scripts. - Not yet researched: Gradle hook plugins, and Go hook tools other than lefthook.
What to do
- Implement
install.strategy: noneintools/dev/sync-hook-managers.py(no shim case; the install skill installs no shim for it). - Add registry entries for simple-git-hooks, cargo-husky and the two Maven plugins, with their detection rules, and run
tools/dev/sync-hook-managers.py. - Check the open points above (JGit in a worktree, the Maven hook scripts), and add Gradle plugins and Go tools if any need an adapter.
- Document the cargo-husky worktree limitation and the git-build-hook
configurecaveat in the contract's adapter table and indocs/setup/secure-agent-setup.md.
Acceptance
- Each manager's behaviour under the whole-user dispatcher is confirmed by running it once (install, then a commit that runs its hook), and recorded in the contract.
prek run --all-files --skip workspace-pytestand the dev tests pass.
- Lingua principale
- Python
- Stelle
- 124
- Fork
- 114
- Merge medio
- 15h 48m
- PR unite (30g)
- 370
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/magpie
-
Import skills use a security-issue-import vetted-ops caller that no policy template declaresForse già presa @KatalKavya96 l’ha presa 5 giorni fa. Apertagood first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
apache/magpie#1731 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-2 giorni Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
family:tools substrate:sandbox
Difficoltà 4/5 1-2 giorni Idoneità per principianti 56/100
I maintainer di solito rispondono entro 1 giorno
-
contract:hook-manager family:setup good first issue
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/magpie
Issue simili
-
request-theme
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
LizardByte/ThemerrDB#9575 ·
I maintainer di solito rispondono entro 1 giorno
-
Author Page: noshin-nawalApertaauthor-page correction
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
acl-org/acl-anthology#10599 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
zilliztech/memsearch#818 ·
I maintainer di solito rispondono entro 1 giorno
-
[FAQ] Commit ID for ProjectsForse già presa @github-actions l’ha presa oggi. Apertafaq-proposal
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
DataTalksClub/faq#503 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
README.zh-CN/ja/es still hard-code 501 test counts after README.md went count-freeForse già presa @Aaqibhafeezkhan l’ha presa oggi. Apertabeginner documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
BistaDinesh03/critique#164 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno