github / github/gh-stack

Reordering a stack can cause PRs to be incorrectly marked as merged

Aperta
#411 1 commento 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
1.5k
Fork
70
Merge medio
1g 8h
PR unite (30g)
7

Descrizione

## Problem

After reordering a published stack, I ran:

```bash
gh stack modify
gh stack push
gh stack submit
```

`gh stack push` updated the branch ancestry without updating the existing PR bases. Some PRs then targeted descendant branches that already contained their commits.

GitHub saw empty diffs and automatically marked those PRs as merged, although their commits were never merged into `main`. The PRs could not be reopened and had to be recreated with new branch names.

## Version

`gh stack version 0.0.8`

## Expected behavior

I expected `gh stack push` either
- to update the remote stack to match the reordered local stack,
- or to fail and tell me to use `gh stack submit` for this operation.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dall’implementazione alla base di `gh stack push`, quindi traccia come vengono gestite l’ascendenza degli stack riordinati e le basi dei PR esistenti. Riproduci la sequenza `gh stack modify`, `gh stack push` e `gh stack submit` riportata nel report; il lavoro è completato quando push sincronizza in sicurezza lo stack remoto oppure indirizza chiaramente gli utenti a eseguire submit, senza che i PR vengano contrassegnati erroneamente come merged.

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

Valutazione

Stack tecnologico
github, go
Ambito
cli
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.