Can not merge pull requests after approval due to The merge-base changed after approval. #58535
Replies: 69 comments 35 replies
-
|
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.
-
|
I am also facing the same issue and it definitely looks like a bug. Can anyone from Github team look into this? |
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.
-
|
Just another person on a team experiencing this bug! |
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.
-
|
Can you please stop bumping this issue and just upvote instead? I am tired of receiving a notification and thinking progress has been made / a new insightful comment has been added, only to find it's another troglodyte with a GitHub account. |
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.
-
|
Still experiencing this |
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.
-
|
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.
-
|
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.
-
|
Also getting this happening:
|
Beta Was this translation helpful? Give feedback.
-
|
Even without approvals just for a single dev workflow, I had to manually merge after hitting this nonsense. I can't believe this issue is around since 2023. |
Beta Was this translation helpful? Give feedback.
-
|
Problem: The message “The merge-base changed after approval” appears when a pull request (PR) is approved but cannot be merged because the base branch (usually main or develop) has received new commits after the approval. GitHub automatically blocks merging in this situation to ensure that the branch being merged is still compatible with the latest base branch code. 1 .Go to your local repo: 2.Pull the latest updates from main (or whichever branch you are merging into): git fetch origin 3.Resolve any merge conflicts if they appear.
git push origin feature/your-branch-name --force If you’re using branch protection rules, approvals may be dismissed after the base branch changes. |
Beta Was this translation helpful? Give feedback.
-
|
Happened to our private repository today, closing & reopening PR then re-reviewed it seems to do the trick. Hope this get fixed soon |
Beta Was this translation helpful? Give feedback.
-
|
Welcome me to the club. Just faced this issue, had no answers to it. The only thing that helped was to change the base branch from |
Beta Was this translation helpful? Give feedback.
-
|
Experienced this for the 1st time today. Nobody merged anything even, only created new branches. |
Beta Was this translation helpful? Give feedback.
-
|
To chime in. I found that if I pulled all the latest changes, and changed the base (the branch I'm merging into) to another branch, then changed it back (on github) it seemed to resolve the issue |
Beta Was this translation helpful? Give feedback.
-
|
We faced the same issue and had to close & reopen the PR. |
Beta Was this translation helpful? Give feedback.
-
|
We've had the same issue, closing and reopening the PR fixed it for us |
Beta Was this translation helpful? Give feedback.
-
|
+1 from me, same issue just now. Thanks for the tips above on closing and opening it again. I still had to get a new approval, but at least it realized that the branch I'd based my branch on (which wasn't master) had been merged. |
Beta Was this translation helpful? Give feedback.
-
|
+1, Opened a PR(X) -> got one approval -> needed more changes -> Converted to draft -> another PR(Y) got merged -> Converted PR(X) to Review again but it couldn't be merged even though all new approvals were there. I also saw the changes from PR(Y) in PR(X). Thanks for the workaround. |
Beta Was this translation helpful? Give feedback.
-
|
faced this issue today...closing and re-opening the Pr fixed it... |
Beta Was this translation helpful? Give feedback.
-
|
Bump, because we are experiencing the same problem on GitHub Enterprise 3.11.5. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
This doesn't sounds like an issue, but the intended purpose of the check. |
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.
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