Skip git-written Merge, Revert and fixup subjects in the guardrails PreToolUse convention guard
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
Direzione di ricerca
Leggi plugins/guardrails/hooks/block-convention-violation.sh attorno al controllo del formato stdin e confronta il relativo elenco di esclusione con quello di plugins/guardrails/git-hooks/commit-msg-convention.sh. Aggiungi una copertura di regressione in block-convention-violation.test.sh usando un pattern di fixture che escluda gli oggetti dei merge. Il lavoro è completato quando viene accettato un oggetto scritto da git, Merge main abc into feature, e Mergers and acquisitions continua a essere rifiutato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of #20534
Loosens the PreToolUse convention check slightly: needs the owner's yes.
Steps to reproduce
- In a repository whose
subject_patterndoes not itself allowMerge .+(for example a ticket-key pattern), a subagent runsgit -C $W merge --no-ff --no-commit <branch>. - It commits with a heredoc:
W=<repo>; git -C $W commit -F - <<'EOF'/Merge main abc into feature/EOF.
Expected behavior
The subject git itself writes for a merge, revert, fixup, squash or amend passes, as the installed commit-msg git hook already allows.
Actual behavior
block-convention-violation.sh refuses the subject. The -m retry passes, because the guard checks only the stdin form (((stdin_form)) || return 0, plugins/guardrails/hooks/block-convention-violation.sh:382).
Severity
Low
Severity justification
One refusal and a retry per merge commit written through a heredoc; nothing is lost.
Suggested fix location
block-convention-violation.sh:393-395: after [[ -n "$subj" ]] || return 0, return 0 for "fixup! "* | "squash! "* | "amend! "* | "Merge "* | 'Revert "'*, copied character for character from plugins/guardrails/git-hooks/commit-msg-convention.sh:64.
Evidence
- Verified by reading
origin/main(6f9409abe9): the skip list exists only in the git hook (commit-msg-convention.sh:64). - Not reproduced here: this repository's own pattern includes
Merge .+|Revert ".+, so the probe passes in this repo; reproducing needs a fixture whosesubject_patternlacks them. - Root cause left open:
sequencer_in_progress(:236, called at:384) misses becausehook::git_effective_dir_toinhook-utils.shdoes not expand-C $W, so the in-progress merge is not seen. - The item's author ran a sandbox copy with this patch: suite PASS=181 FAIL=0; the full Bash guard chain gave 0 on merge, revert and fixup subjects and 2 on junk subjects. Not re-run this pass.
Acceptance criteria
- In a fixture repo with a pattern lacking Merge, a heredoc commit with subject
Merge main abc into featurethroughW=<repo>; git -C $Wwith no MERGE_HEAD exits 0. -
Mergers and acquisitionsis still refused in that fixture. -
block-convention-violation.test.shpins both.
Constraints and gotchas
- In a repo with a
subject_patternbut no commit-msg hook installed, a non-merge-Fheredoc commit starting with one of these prefixes would no longer be checked at PreToolUse. - Separate defect, not covered: the subject is taken from an earlier non-commit heredoc (see #20535 case 3).
Context
Source: local handoff item 20261201-165317 section 7 (retired into this issue).
- Lingua principale
- Shell
- Stelle
- 22
- Fork
- 2
- Merge medio
- 1h 54m
- PR unite (30g)
- 938
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun 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 melodic-software/claude-code-plugins
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
melodic-software/claude-code-plugins#20573 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-owner-decision
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
melodic-software/claude-code-plugins#20541 ·
I maintainer di solito rispondono entro 1 giorno
-
Replace attribution setup's "until the plugin migrates" sentence with what the plugin actually doesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
melodic-software/claude-code-plugins#20531 ·
I maintainer di solito rispondono entro 1 giorno
-
Tighten bugs scan, setup and write wording on filing authority, migration phrasing and coaching textAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
melodic-software/claude-code-plugins#20530 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
melodic-software/claude-code-plugins#20526 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di melodic-software/claude-code-plugins
Issue simili
-
Battery "top up once" ends immediately when UPower reports fully-charged below 100%Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
omacom/omarchy#21286 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
libretro/libretro-super#2238 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ChurchCRM/docs.churchcrm.io#328 ·
I maintainer di solito rispondono entro 1 giorno
-
type/documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
c-w-z/commit-decision-record#90 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
bmaltais/StartDrive#17 ·