Can not merge pull requests after approval due to The merge-base changed after approval. #58535
Replies: 63 comments 33 replies
-
I ran into the same problem. In my case I had issued the pull request and requested a review from someone, then before they got to it I pushed a new commit removing some commented code. It seems to be related to these security enhancement changes: https://github.blog/changelog/2023-06-06-security-enhancements-to-required-approvals-on-pull-requests/. Since I am an org owner I was able to look at the branch protection settings and saw the setting in the image below. After I deselected this setting my reviewer was able to approve the PR and merge the changes. From the wording of the setting I think even with it enabled it should have allowed my reviewer to approve and merge the changes, since I made the later commit before he did the review. I think this is a bug. |
Beta Was this translation helpful? Give feedback.
-
I also think this is a bug since closing the pr and re-openning it caused the issue to go away without changing any repository settings. |
Beta Was this translation helpful? Give feedback.
-
Not sure if this will help anyone but I've just had this happen on a branch where I had branched off from an existing branch (didn't mean to do this......) and then the first brach was merged into master/main. This seemed to trigger the message appearing. |
Beta Was this translation helpful? Give feedback.
-
It looks like the pointer to the baseline branch is fixed in a PR, but then there is some process to check that sha. It fails because the baseline tip moved. You can edit a PR and change a baseline from e.g. |
Beta Was this translation helpful? Give feedback.
-
Also getting this happening:
|
Beta Was this translation helpful? Give feedback.
-
We're hitting this now too. Strangely, I turned off the Dismiss stale pull request setting, and now the reviews aren't getting dismissed, but the PR still acts like no one has approved. Closing and re-opening the PR was the only thing that allowed us to move forward. |
Beta Was this translation helpful? Give feedback.
-
Happens to me too. Auto-dismisses my review without any new code. |
Beta Was this translation helpful? Give feedback.
-
Saw this as well with commits and PR created on Aug 7, 2023. As soon as a new review was added the review would be dismissed with the message
Closing the PR and re-opening it did fix the issue. We do have dismiss stale reviews enabled, but no new commits were added. |
Beta Was this translation helpful? Give feedback.
-
We are experiencing this same issue. It requires closing and opening the PR, or having somebody with admin permissions to override the required approval. (Turning off dismiss stale approvals is not something we are willing to do) According to the git history, there were no commits that triggered this condition. |
Beta Was this translation helpful? Give feedback.
-
I'm experiencing this as well. Can't find a rhyme or reason to it. I'll approve a pull and it will immediately be dismissed seconds later. There aren't any new commits being pushed. |
Beta Was this translation helpful? Give feedback.
-
We are also seeing this. My PR is from my branch -> dev. The last commit to both master/dev was over an hour ago, and my last commit on my branch was over 30 minutes ago (I double checked). Every review said "Dismissed - The merge-base changed after approval."
|
Beta Was this translation helpful? Give feedback.
-
In my case, I could merge my PR after adding members on the Collaborators and Teams page in Settings. Just FYI. |
Beta Was this translation helpful? Give feedback.
-
Just a "me too" on this. A PR was stuck like this, pushed another branch name (of the same commit) and it approved and merged successfully. If anyone from GitHub actually wants to try to fix, I have left the "dead" PR open. Feel free to reach out. |
Beta Was this translation helpful? Give feedback.
-
Disabling the branch protection for "Dismiss stale pull request approvals when new commits are pushed" allowed us to get pass the message, "the merge-base changed after approval". This is a weird bug because nobody has made any new commits to our PR and it's annoying because it happens randomly. Any chance that Github Support can investigate this bug? |
Beta Was this translation helpful? Give feedback.
-
Just another person on a team experiencing this bug! |
Beta Was this translation helpful? Give feedback.
-
+1 from my organisation as well. |
Beta Was this translation helpful? Give feedback.
-
Bump. Still experiencing this |
Beta Was this translation helpful? Give feedback.
-
I got this same thing. Two approvals and it auto dismissed them two times in a row even when I wasnt at my computer. Closing and reopening the PR auto-magically resolved the issue for me, but it still seems to be a defect. |
Beta Was this translation helpful? Give feedback.
-
Bump |
Beta Was this translation helpful? Give feedback.
-
Bump |
Beta Was this translation helpful? Give feedback.
-
bump |
Beta Was this translation helpful? Give feedback.
-
Bump. As far as I can tell the merge base did not actually change for us, but we still got the message. We have branch protection rules in place for a reason but this was not expected behaviour. |
Beta Was this translation helpful? Give feedback.
-
Had this error happen to me as well, changing base to itself worked. |
Beta Was this translation helpful? Give feedback.
-
This problem has started occuring for almost all my PR's since last week. The PR will be approved, and then immediately after, Github will say it's been dismissed (by me lol) due to the base branch changing. No changes were made, the base branch didn't change. How can we stop this buggy behaviour? Then after another approval, the PR is in "Approved" state, yet still cannot be merged as it says it needs approval. Something funky is going on here... |
Beta Was this translation helpful? Give feedback.
-
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
Bumping to say this is still an issue. This setting should clear approvals when the branch for the PR changes, to denote that the approvals are for an old version. Instead it also clears any time the base branch gets changed, such as another PR merging, even if there are no conflicts with the in-review PR. Wiping on base branch changes makes this setting pretty much useless. Please fix this setting to check against the PR branch rather than the base branch the PR is merging into. |
Beta Was this translation helpful? Give feedback.
-
This has also happened to me today, still an issue. Closing and reopening the PR fixes though |
Beta Was this translation helpful? Give feedback.
-
Happened today, closing and reopening PR fixed 🤔 |
Beta Was this translation helpful? Give feedback.
-
Happened today, reopening PR helped fixing the issue. A very annoying one. |
Beta Was this translation helpful? Give feedback.
-
Still an issue. Unsetting the PR dismissing rule didn't help. Verified no changes to the base branch had been made. Close/reopen on the PR got the approval to stick. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Hello
Yesterday we noticed that there is a weird message appearing when a PR is approved. We have a feature branch created from main and we are trying to merge it to develop. Once the PR is approved and required checks pass, we see this message suggesting that the merge-base has changed after approval, although it has not.
This has a significant impact on developer experience, so I kindly ask for your support/guidance.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions