github / github/gh-stack

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

Offen
#411 1 Kommentar 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
1.5k
Forks
70
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
7

Beschreibung

## 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Implementierung hinter `gh stack push` und verfolge anschließend, wie neu angeordnete Stack-Abstammungen und bestehende PR-Basen behandelt werden. Reproduziere die Sequenz `gh stack modify`, `gh stack push` und `gh stack submit` aus dem Bericht; als erledigt gilt die Aufgabe, wenn push den entfernten Stack sicher synchronisiert oder Benutzer eindeutig anweist, submit zu verwenden, ohne dass PRs fälschlicherweise als gemergt markiert werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github, go
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.