A stacked pull request cannot use auto-merge
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
Comece com o comando gh stack link e reproduza a rejeição usando o cenário de duas camadas da issue. Leia o tratamento de auto-merge e da vinculação de stacks junto com as issues relacionadas #174, #172, #502 e #503. O trabalho estará concluído quando os pull requests empilhados puderem manter o auto-merge ou quando o comando e o painel do stack explicarem claramente a incompatibilidade e a necessidade de enfileiramento manual.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
gh2.100.0,gh stackv0.0.8- Trunk protected by a merge queue,
merge_method: REBASE - Two-layer stack, both pull requests approved with required checks passing
Reproduction
- Open two pull requests that stack on each other, both approved and green.
- Enable auto-merge on the bottom one.
- 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
- Linguagem predominante
- Go
- Estrelas
- 1.5k
- Forks
- 73
- Merge médio
- 1d 8h
- PRs com merge (30d)
- 7
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/gh-stack
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
-
feature request topic: cli - general
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
feature request topic: auto-merge
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
bug topic: docs
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 68/100
Todas as issues de github/gh-stack
Issues semelhantes
-
textual definition
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
geneontology/go-ontology#32653 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 75/100
-
needs design
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Priority/High ready-for-agent Severity/Major Type/Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100