Repository navigation
Fase 2: generador del workflow en la web, errores accionables y más blindaje - #56
Merged
Merged
Conversation
…; push con aviso de permisos - Mensajes de error que dicen qué hacer: usuario inexistente (404), token rechazado (401), 403 de permisos, límite de peticiones (con y sin token, con la hora de reinicio) y caídas 5xx. Nunca incluyen el token (test). - Dentro de GitHub Actions el error fatal sale también como anotación ::error (escapada, de una línea) para verse en el resumen de la ejecución. - Pista del login no válido («quita la @», vacío, demasiado largo...). - generate.Install: workflow + README para light, dark o both (claro y oscuro con <picture>); Workflow se apoya en ella. Nuevo subcomando `commitling workflow` (alias init) que lo imprime. - El workflow de ejemplo explica en el propio log por qué falla el push (permissions: contents: write o rama protegida). README y USO al día. La interfaz de action.yml no cambia. Hecho por Claude. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rkflows generados - action.yml: ::add-mask:: del token antes de ejecutar nada (defensa en profundidad para un token pegado en claro). Sin cambios en la interfaz. Test TestActionMasksTheToken. - action-test: un usuario inexistente falla aunque keep-on-error esté activa. - CI: genera los 13 workflows posibles con `commitling workflow`, exige @v1 y los valida con actionlint 1.7.12 (binario oficial con SHA-256 fijado, con shellcheck) junto con los workflows del repositorio. Hecho por Claude. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…era de línea - Usuario (o enlace del perfil), especie, tema (claro, oscuro o automático con las dos tarjetas y <picture>) y tamaño → workflow y README listos para copiar, seis pasos para quien nunca ha usado Actions con enlaces directos a GitHub (incluido «Abrir GitHub con el archivo ya relleno») y «Si algo falla» con cada mensaje y qué hacer. Sin JavaScript se ve el workflow base. - install.js: sin red, sin wasm, sin almacenamiento ni innerHTML; produce byte a byte lo mismo que generate.Install (TestInstallJSMatchesGo con las 48 combinaciones) y tiene test de comportamiento en Node con DOM falso. - El CSS pasa a style.css y la CSP queda en style-src 'self' (origen compartido bertmarti.github.io); sin atributos style=. - README y docs/USO.md: el generador como camino fácil, pasos más claros, qué hacer si el workflow sale en rojo; CHANGELOG de 0.8.0. install.js y su test en Node: GPT-5.6 Luna (delegado; el primer intento agotó el tiempo sin entregar), revisado, corregido y completado por Claude (paso de usuario desde el generador, enlaces con consulta, tests de la interfaz). Marcado, CSS, tests en Go y textos: Claude. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decisiones del generador del workflow (paridad Go/JS, tema both, aviso de permisos en el workflow, CSS fuera de línea por el origen compartido). Hecho por Claude. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tubería del CI) Hecho por Claude. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hecho por Claude. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Generador: Enter en el formulario ya no lo envía (antes recargaba la página con ?user=… en la URL y el historial); test en Node. - install.js solo acepta los valores permitidos de especie, tema y tamaño (lo demás es el valor por defecto), como Go; test. - action.yml: ::add-mask:: con printf y sin saltos de línea, para que un token con salto final quede enmascarado entero (TestActionMasksTheToken). - action-test: el usuario inexistente se prueba con un SVG previo, que debe quedar intacto (cmp). - Mensajes de límite y 5xx (y textos de README y web): si se ve el error es que no se pudo conservar la criatura (no había SVG o keep-on-error=false). Hecho por Claude. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fase 2: fácil de instalar, errores que dicen qué hacer y más blindaje
La interfaz de
action.ymlno cambia (mismas entradas, salidapath, archivos y SVG byte a byte: las 96 huellas de v0.5.0 pasan). No se crean releases ni se mueven etiquetas.Qué cambia
<picture>) y tamaño → YAML para.github/workflows/commitling.ymly fragmento del README listos para copiar. Seis pasos para quien nunca ha usado Actions (repositorio de perfil, crear el archivo, permisoscontents: write, primera ejecución con «Run workflow», README y resultado), enlaces directos a GitHub (incluido «Abrir GitHub con el archivo ya relleno») y «Si algo falla». Sin red, sin wasm, sin almacenamiento, sininnerHTML; sin JavaScript se ve el workflow base.install.jsproduce byte a byte lo mismo quegenerate.Install(Go):TestInstallJSMatchesGocompara las 48 combinaciones; test de comportamiento en Node con DOM falso.commitling workflow(aliasinit) imprime el mismo workflow (--theme light|dark|both).::erroren el resumen. El workflow de ejemplo explica en el log por qué falla elgit push(permisos o rama protegida).::add-mask::del token antes de nada (test; los mensajes nunca incluyen el token, test), CSP sin'unsafe-inline'en estilos (CSS enstyle.css, sinstyle=; origen compartidobertmarti.github.io), actionlint 1.7.12 (SHA-256 fijado, con shellcheck) sobre los 13 workflows generables y los del repositorio; la prueba de la Action comprueba que un usuario inexistente falla.docs/USO.mdrevisados como usuario nuevo; CHANGELOG 0.8.0, MEMORY, PLAN y AGENTS al día.Cómo probarlo
GOFLAGS=-p=2 go test ./...ynode internal/gallery/testdata/install.test.js internal/gallery/install.jsgo run ./cmd/commitling workflow --user tu-usuario --theme bothgo run ./cmd/commitling gallery --out site/commitling+ wasm,python3 -m http.servery abrir/commitling/#instalar(probado en navegador: usuario no válido → aviso yaria-invalid; válido o enlace pegado → enlaces correctos; «Automático» → dos pasos y<picture>; sin violaciones de CSP; sin desbordes a 320 px).Quién hizo qué
install.jsy su test en Node: GPT-5.6 Luna (delegado; el primer intento agotó los 40 min sin entregar, el segundo entregó), revisado, corregido y completado por Claude.--agent plan): sin hallazgos.Install,workflow),action.yml, CI, marcado y CSS, tests en Go, textos y docs: Claude.🤖 Generated with Claude Code