github / github/gh-stack

Can't merge a stacked PR with no clear reason (all PRs show mergeable)

Ouverte
#323 27 commentaires 84 réactions 0 personnes assignées Voir sur GitHub
bug topic: merge
Langage dominant
Go
Étoiles
1.5k
Forks
70
Merge moyen
1 j 8 h
PR mergées (30 j)
7

Description

## Environment
- develop branch are protected by a repository ruleset with:
- require_last_push_approval: true
- dismiss_stale_reviews_on_push: true
- required status checks
- No merge queue.

## Reproduction

1. Create a 3-level stack: develop <- A <- B <- C.
2. Approve every PR after its latest push. All three show MERGEABLE / CLEAN / APPROVED, all checks green.
3. On the top PR (C), the native GitHub "Merge stack (3)" box shows "Able to merge as a stack". Click it (merge method: Create
a merge commit) and confirm.

## Expected

All three PRs merge into develop, or the operation stops before anything merges.

## Actual

- UI shows "Merging stack… / 3 pull requests are being merged" briefly, then rolls back to "Able to merge as a stack". Nothing
merges.
- The PR event log records repeated auto-merge was automatically disabled — "Pull Request is not mergeable".

(In the image, the bottom PR has been merged, but the behavior remains the same even if it is not merged.)
Image
Image
Image

## Notes

- Root cause not confirmed — the above are observed events only. One hypothesis is that merging the bottom PR moves the
merge-base of the PR above it, invalidating its latest-push approval, but this has not been verified.
- Reproduces without a merge queue, which differs from #174 (scoped to merge-queue branches, describes a hang rather than a
rollback). Filing separately because the trigger and symptom differ; feel free to consolidate into #174 if preferred.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction documentée de la stack à trois niveaux et examinez le journal des événements de PR tout en comparant la capacité de merge, les approbations et les checks requis de chaque PR. Lisez la distinction faite dans #174 et vérifiez si l’approbation du dernier push change lorsque les PR inférieures sont mergées. Le travail est terminé lorsque la cause du rollback est identifiée et que le comportement de merge de la stack tout-ou-rien est vérifié.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github, go
Domaine
cli, devtools
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.