github / github/gh-stack

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

未关闭
#323 27 条评论 84 个 reaction 已指派 0 人 在 GitHub 查看
bug topic: merge
主要语言
Go
星标
1.5k
派生
70
平均合并
1 天 8 小时
30 天内合并 PR
7

描述

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

贡献指南

打开贡献指南

调研方向

Start with the documented three-level stack reproduction and inspect the PR event log while comparing each PR's mergeability, approvals, and required checks. Read the distinction from #174 and investigate whether the latest-push approval changes as lower PRs merge. Done means the rollback cause is identified and the all-or-nothing stack-merge behavior is verified.

由索引模型根据 Issue 内容生成。

评估

技术栈
github, go
领域
cli, devtools
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。