A stacked pull request cannot use auto-merge

Aperta
#504 0 commenti 7 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia con il comando gh stack link e riproduci il rifiuto usando lo scenario a due livelli descritto nell’issue. Leggi la gestione di auto-merge e del collegamento degli stack insieme alle issue correlate #174, #172, #502 e #503. Il lavoro è completato quando le pull request impilate possono mantenere auto-merge, oppure quando il comando e il pannello dello stack spiegano chiaramente l’incompatibilità e la necessità di accodarle manualmente.

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

Descrizione

Summary

gh stack link refuses a pull request that has auto-merge enabled, so adopting a stack costs a capability that an unstacked pull request keeps. Every layer then needs a person at the keyboard at the moment the layer below lands.

Evidence

Both pull requests approved and green. #101 had auto-merge enabled, so linking failed:

Checking existing stacks...
Looking up PRs for 2 branches...
✗ PR #101 cannot be added to a stack: it has auto-merge enabled

Turning auto-merge off let the link succeed.

This compounds the behaviour in #174. When the bottom layer merges, the layer above leaves the queue and GitHub rewrites its head, which restarts its required checks. Nothing puts it back. With auto-merge unavailable, only a person can, and only once the restarted checks finish. A stack of three with a 15-minute required check needs three waits and three manual enqueues to land one change.

Expected

A stacked pull request can use auto-merge, so each layer enqueues itself once its base merges and its checks pass.

If the two genuinely cannot coexist, say so where the user meets it: gh stack link should explain why auto-merge and stacks are exclusive, and the stack panel should say that each layer needs a manual enqueue.

Actual

gh stack link rejects the pull request with no explanation of the conflict, and offers no alternative.

Environment

  • gh 2.100.0, gh stack v0.0.8
  • Trunk protected by a merge queue, merge_method: REBASE
  • Two-layer stack, both pull requests approved with required checks passing

Reproduction

  1. Open two pull requests that stack on each other, both approved and green.
  2. Enable auto-merge on the bottom one.
  3. Run gh stack link <bottom> <top>.

Note on scope

This reports only what was observed: gh stack link rejects a pull request that already has auto-merge enabled. The reverse direction, enabling auto-merge on a pull request that is already stacked, was not tested, because the repository in question has allow_auto_merge: false set at the repository level for unrelated reasons.

Related

  • #174 — the layer above leaves the queue and is not put back, which is what makes the missing auto-merge costly
  • #172 — "'Merge stack' appears to enqueue only the bottom PR"
  • #502 — the merge queue rewrites a commit that needed no rewrite, which is what restarts the checks
  • #503 — the panel gives no sign that a manual enqueue is needed
Lingua principale
Go
Stelle
1.5k
Fork
73
Merge medio
1g 8h
PR unite (30g)
7

Guida per i contributori

Apri la guida per i contributori

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 github/gh-stack

Tutte le issue di github/gh-stack

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.