github / github/gh-stack

Getting Every PR in this stack has already been merged, when there is a PR already

Open
#385 2 comments 0 reactions 0 assignees View on GitHub
bug topic: merge queue
Dominant language
Go
Stars
1.5k
Forks
70
Avg merge
1d 8h
Merged PRs (30d)
7

Description

So I had branch 1 and branch 2 that created normally, and then branch3 was created while branch2 was in merge queue.

Then the git diff went weird but I fixed the merge conflicts, and thought maybe I'd try to `gh stack unstack`, but it didn't allow me because it was still part of the stack. Oh well, I continued on and tried making a PR for `branch4` and got this.

```
⚠ Every PR in this stack has already been merged on GitHub
Adding to a fully merged stack isn't supported — starting a new stack for your 2 unmerged branches based on master
Pushing to origin...
PR #52141 for branch3
✓ Created PR #52148 for branch4
✓ Stack created on GitHub with 2 PRs (stack #52149)
✓ Pushed and synced 2 branches
```

Everything looks good on the UI though

Contributor guide

Open the contributing guide

Research direction

Reproduce the sequence where branch3 is created while branch2 is in the merge queue, then run `gh stack unstack` and create a PR for branch4. Inspect the stack and PR creation flow to determine why it reports every PR as merged despite the resulting UI appearing correct. Done means the sequence no longer produces an inaccurate merged-stack warning or leaves the stack state inconsistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.