Protect released v* tags with a tag ruleset
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- git, github
- Área
- release
Línea de trabajo
Comienza con la API de rulesets del repositorio y el comando gh api proporcionado; después, inspecciona el ruleset existente Protect main para compararlo. Crea un ruleset de tags activo que coincida con refs/tags/v* y verifica que su patrón de ref no tenga comillas sobrantes. Se considera terminado cuando se rechacen la eliminación y las actualizaciones forzadas de los tags v*, mientras que los tags que no sean v* permanezcan sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
v* tags are now the only path to a production deploy (#52), but nothing makes
a released tag immutable. There is no tag ruleset on this repo — the only
ruleset is Protect main, which targets branches.
So after v2.0.0 has built, passed every gate and deployed, the tag can be
deleted and re-pushed at a different commit:
git tag -d v2.0.0 && git push origin :refs/tags/v2.0.0
git tag v2.0.0 <any-commit> && git push origin v2.0.0
That re-runs the whole pipeline and deploys the new commit under a version
number that already means something else. The release history stops being a
record of what was shipped, and the github-pages environment's v* tag policy
happily allows it because the ref name is unchanged.
Proposed fix
Add a repository ruleset targeting tags:
- Target: tag, include pattern
v* - Rules:
deletion(block tag deletion),non_fast_forward(block force
updates) - Enforcement: active, no bypass actors
gh api repos/laywill/laywill.github.io/rulesets \
-X POST \
-f name='Protect release tags' \
-f target='tag' \
-f enforcement='active' \
-f 'conditions[ref_name][include][]=refs/tags/v*' \
-f 'conditions[ref_name][exclude][]' \
-f 'rules[][type]=deletion' \
-f 'rules[][type]=non_fast_forward'
Worth confirming the resulting conditions.ref_name.include reads back as
refs/tags/v* with no stray quote characters — a literal-quote pattern silently
matches nothing, which is how the github-pages tag policy and the main entry
in Protect main were both broken on first attempt.
Trade-off
Mistyped or premature tags become unfixable in place; the recovery is to burn the
version and tag the next one. That is the normal cost of immutable releases and
is cheap here — pre-release tags (v2.0.0-rc.N) run the full pipeline and skip
deploy, so a candidate can be exercised before the real tag is cut.
Acceptance criteria
- Tag ruleset exists, active, matching
refs/tags/v* -
git push origin :refs/tags/<test-tag>is rejected for av*tag - Force-updating an existing
v*tag is rejected - Non-
v*tags are unaffected
Related
- #25, #52 — the tag-gated release pipeline this protects
- Lenguaje dominante
- HTML
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 8 h 17 min
- PR fusionados (30 d)
- 58
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de laywill/laywill.github.io
-
design
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
laywill/laywill.github.io#186 ·
-
design
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
laywill/laywill.github.io#183 · 1 comentario ·
-
Dificultad 2/5 Medio día Aptitud para principiantes 74/100
laywill/laywill.github.io#135 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
laywill/laywill.github.io#106 ·
-
infra needs-william
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
laywill/laywill.github.io#35 · 1 comentario ·
Todos los issues de laywill/laywill.github.io
Issues similares
-
Help-Wanted Needs-Triage Package-Update
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
microsoft/winget-pkgs#440023 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Needs: Triage Type: Feature request
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
AntennaPod/AntennaPod#8794 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
cactus-compute/needle#142 ·
-
triage:deciding
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
open-telemetry/otel-arrow#4147 ·