You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GitHub stack view (native stack feature, not CLI) shows "not ready" on some PRs in a 13-level stack, and displays "unable to merge as a stack" globally, even though every PR in the stack reports mergeable=MERGEABLE, mergeStateStatus=CLEAN (or UNSTABLE), reviewDecision=APPROVED, and all status checks passing via both REST and GraphQL APIs.
13 PRs in total. The bottom PR targets base-branch; each subsequent PR targets its predecessor's branch. All PRs are open, non-draft, created via gh stack submit.
Environment
gh 2.97.0
gh-stack v0.1.0
Repository: private, no branch protection, no repository rulesets, no merge queue, no CODEOWNERS.
"Dismiss stale pull request approvals when new commits are pushed": disabled.
Both are history-import PRs — they contain 500+ commits each (preserved full history of the imported repositories), adding ~48k lines across 180+ files.
The remaining PRs are smaller (single-digit to low-double-digit commits).
Attempted workaround: close + reopen the "not ready" PRs
We closed and reopened PR #8 (the first "not ready" PR in the stack) to force a full server-side recompute:
gh pr close 8 && gh pr reopen 8
Result:
The individual PR returned to mergeable=MERGEABLE, reviewDecision=APPROVED correctly.
The stack view took ~30 seconds to reload, but the state did not change: PR Docs site for stacks #8 remained "not ready", PR add alias command #9 remained "blocked downstack", and the global message stayed "unable to merge as a stack".
Close+reopen did not invalidate the stack view's cached state. The stack view appears to maintain its own independent cache that is not invalidated by PR state changes.
Expected behavior
Given that:
All PRs are mergeable (no conflicts, MERGEABLE).
All PRs are approved (APPROVED).
All required status checks pass (SUCCESS).
No branch protection, rulesets, CODEOWNERS, or merge queue block merging.
Close+reopen did not help.
GitHub's native stack view should reflect the actual PR state and show all 13 PRs as "Ready", with the "Merge stack (13)" option enabled and functional. A stale cached state rendering the stack unmergeable is a blocking UX bug.
Related
Can't merge a stacked PR with no clear reason (all PRs show mergeable) #323 — "Can't merge a stacked PR with no clear reason (all PRs show mergeable)". Same class of bug: stack UI state differs from API state. In our case the stack never shows as mergeable at all (no attempt to merge fails — the UI never allows the attempt). We confirm the MERGEABLE/CLEAN/APPROVED symptom. Our close+reopen attempt did not resolve it, suggesting a different cache invalidation path.
Summary
The GitHub stack view (native stack feature, not CLI) shows "not ready" on some PRs in a 13-level stack, and displays "unable to merge as a stack" globally, even though every PR in the stack reports
mergeable=MERGEABLE,mergeStateStatus=CLEAN(orUNSTABLE),reviewDecision=APPROVED, and all status checks passing via both REST and GraphQL APIs.Stack structure (anonymized)
13 PRs in total. The bottom PR targets
base-branch; each subsequent PR targets its predecessor's branch. All PRs are open, non-draft, created viagh stack submit.Environment
gh2.97.0gh-stackv0.1.0Observed behavior
In the GitHub stack UI (native stack view)
Via the API (both REST and GraphQL, confirmed multiple times over several minutes)
Every PR in the stack (including #8 and #10) consistently reports:
mergeableMERGEABLEmergeStateStatusCLEAN(orUNSTABLE— only non-required checks pending like CodeRabbit)reviewDecisionAPPROVED(multiple approvals from different reviewers)statusCheckRollup.stateSUCCESSisDraftfalserequested_reviewers[](no pending reviewer requests)GraphQL query used:
{ repository(owner: "O", name: "R") { pullRequest(number: N) { mergeable mergeStateStatus reviewDecision isDraft statusCheckRollup { state } } } }Context about the "not ready" PRs (#8 and #10)
gh stack submitflow, all with the same review/check configuration.Attempted workaround: close + reopen the "not ready" PRs
We closed and reopened PR #8 (the first "not ready" PR in the stack) to force a full server-side recompute:
Result:
mergeable=MERGEABLE, reviewDecision=APPROVEDcorrectly.Close+reopen did not invalidate the stack view's cached state. The stack view appears to maintain its own independent cache that is not invalidated by PR state changes.
Expected behavior
Given that:
MERGEABLE).APPROVED).SUCCESS).GitHub's native stack view should reflect the actual PR state and show all 13 PRs as "Ready", with the "Merge stack (13)" option enabled and functional. A stale cached state rendering the stack unmergeable is a blocking UX bug.
Related
MERGEABLE/CLEAN/APPROVEDsymptom. Our close+reopen attempt did not resolve it, suggesting a different cache invalidation path.