GitHub release can attach to an existing tag on another commit

Aperta Adatta ai principianti
#94 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github, typescript
Ambito
devops, release

Direzione di ricerca

Leggi src/lib/github.ts per confrontare il controllo esistente di ref e SHA di createTag con createRelease, poi segui il percorso predefinito githubRelease: true in src/release/index.ts. Verifica come viene gestito un tag esistente su un commit diverso e aggiungi un controllo o un passaggio di creazione del tag prima della creazione del release. Il lavoro è completato quando il release fallisce o usa lo SHA previsto se il tag punta già a un altro commit.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Issue description

createRelease (src/lib/github.ts) sends tag_name + target_commitish. When the tag already exists on another commit, GitHub ignores target_commitish and attaches the release to the existing tag, so the release silently points at the wrong commit. createTag checks that an existing tag is on the expected sha, but the default path (githubRelease: true, src/release/index.ts) never calls it.

Expected: before createRelease, check the tag like createTag does (getRef, compare the sha) and fail when it points elsewhere, or create the tag through createTag first.

Likelihood is low: the config checks prevent tag collisions between groups. A stale or hand-made tag still triggers it.

Found by the quality gate of the v3 rework, branch feat/v3-shared-workflows (commit 4617e86, not pushed yet when this was filed).

Code sample
_No response_
Versions
  • @nanoforge-dev/actions v3 (branch feat/v3-shared-workflows)
Issue priority

Low (slightly annoying)

I have tested this issue on a development release

No response

Lingua principale
TypeScript
Stelle
0
Fork
0
Merge medio
15h 51m
PR unite (30g)
21

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NanoForge-dev/actions

Tutte le issue di NanoForge-dev/actions

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.