feat(playwright): add per-hook enabled settings per the hook-enablement convention

Aberta
#19,299 2 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
github, shell
Domínio
devtools

Direção de pesquisa

Read docs/contracts/hook-enablement/README.md, docs/contracts/plugin-option-naming/README.md, and docs/conventions/playwright.yaml, then inspect plugins/playwright/plugin.json, plugins/playwright/hooks/hooks.json, and hooks/install-python-deps.sh. Extend hooks/install-python-deps.test.sh to cover the three specified layer-resolution cases. The work is done when the option, helper routing, docs, schema, tests, and count-script result meet the acceptance criteria; this issue is blocked by #19284.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Context

plugins/playwright/hooks/hooks.json ships one hook, a SessionStart entry that runs hooks/install-python-deps.sh through exec-bash.mjs. plugin.json declares demo_* and cli_update_hint options but no *_enabled option, so an operator cannot turn the hook off without disabling the plugin or every hook (docs/contracts/hook-enablement/README.md, "Three levels").

Proposed work

Declare the plugin's per-hook settings and route each hook through the shared helper.

Acceptance criteria

  • plugin.json userConfig declares one boolean install_python_deps_enabled for the SessionStart install hook, titled per docs/contracts/plugin-option-naming/README.md#titles.
  • The default follows the convention's "Default" bullet (a hook that starts work the operator did not ask for, such as an install or network call, defaults off); the PR states the chosen default and why.
  • hooks/install-python-deps.sh (or its launcher) resolves plugin default, user layer and repository layer (docs/conventions/playwright.yaml) through the shared helper before doing any work, and exits quietly when the result is off.
  • With the user layer false, the hook does nothing whatever docs/conventions/playwright.yaml says; with the user layer unset and false there, it does nothing; with the user layer unset and true there, it runs.
  • A test covers those three cases (extend hooks/install-python-deps.test.sh).
  • The key is documented in the plugin's config reference and repository-layer schema.
  • The count script lists no playwright entry.

Blocked by: #19284
Parent: #18921

Linguagem predominante
Shell
Estrelas
22
Forks
2
Merge médio
2h 1min
PRs com merge (30d)
972

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de melodic-software/claude-code-plugins

Todas as issues de melodic-software/claude-code-plugins

Issues semelhantes

Mais issues de Shell/Bash

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.