Repository navigation
Partial stack merge dismisses approval on the next PR even though its diff is unchanged #582
GPHemsley-RELX
started this conversation in
Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
After a partial stack merge, GitHub's automatic rebase of the next PR dismisses that PR's approval with "The merge-base changed after approval.", even though the rebased PR's diff is unchanged.
The repository uses rebase merges and has Dismiss stale pull request approvals when new commits are pushed enabled. Both are standard settings, but this combination may not be covered by testing.
The merging docs say Rebase stack keeps approvals when the diff hasn't changed, even with stale-approval dismissal enabled. The automatic rebase after a partial merge doesn't seem to follow the same rule.
Steps to reproduce
main ← A ← B.mainand retarget it.Expected
B's approval is kept because its diff hasn't changed.
Actual
Within seconds of A merging, GitHub force-pushes B and dismisses its approval with "The merge-base changed after approval." B's diff against its base before the rebase matches its diff against
mainafterward: same commit count, files, and patches.As a result, every PR above a partially merged layer needs re-approval, even when nothing in it changed.
Possibly related: #174, a partial merge that invalidated a latest-push approval.
All reactions