release:tag: a rerun after a rejected tag push stops on the local action-v tag

Aperta
#279 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@FredApps ci sta già lavorando.

Dal 17/11/2026.

  • #280 di @FredApps — aperta

Valutazione

Difficoltà
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
20/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
git, node.js, typescript
Ambito
cli, release

Direzione di ricerca

Read scripts/release-tags.mjs and inspect how it creates the annotated action-v<version> tag compared with the other two tags. The issue gives a reproduction using version 9.9.9; check the script's behavior after those local tags exist. Done means rerunning the command can push all three tags after a rejected push, while the existing remote tag checks remain in place. An open linked pull request (#280) indicates work is already underway.

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

Descrizione

npm run release:tag (scripts/release-tags.mjs) creates the three release tags locally, then pushes them in one atomic push. When that push is rejected (network error, a protected-tag rule, a missing permission), the tags it created stay in the local clone. Running the command again then stops before pushing anything:

fatal: tag 'action-v9.9.9' already exists

The v<version> and cli-release-v<version> tags are created with git tag -f, so they are replaced on a rerun. The annotated action-v<version> tag is created with git tag -a and no -f, so it is not. The only way out is to delete the local tag by hand, even though the script's header says reruns are expected ("The workflow accepts tags that already exist").

Reproduce
  1. In a clone whose origin has the release commit on main and no release tags, create the local tags a rejected push leaves behind: git tag v9.9.9, git tag -a action-v9.9.9 -m x and git tag cli-release-v9.9.9, with packages/diffci-cli/package.json at version 9.9.9.
  2. Run node scripts/release-tags.mjs.

Expected: the three tags are pushed at HEAD. Actual: fatal: tag 'action-v9.9.9' already exists, and nothing is pushed.

The tags on origin are still checked before anything is created, so passing -f to the annotated tag only replaces a local tag that was never published.

Lingua principale
TypeScript
Stelle
0
Fork
4
Merge medio
18h 41m
PR unite (30g)
48

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 DiffCI/core

Tutte le issue di DiffCI/core

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.