When I approve a pull request, it stays approved even if there are new commits are added to it before being merged. This means potentially unreviewed code could be merged, since for another administrator it is not clear that the new commit arrived after approval.
Is there a way to automatically revoke Approvals from a pull request if a new commit is added to it afterward?
For Bitbucket Cloud: it's a premium feature (paid accounts only). Add a "Branch Permission" and then click on "Merge Checks" within the newly added Branch Permission and select this option: "[x] Reset approvals when the source branch is modified."
For Bitbucket Server: install the free plugin: Auto Unapprove for Bitbucket Server.
Agreed... but then most cars share the same basic functional features... 4 wheels, steering wheel, hand brake, etc.
If you'd asked "I have a car with 5 gears but want to use 6th gear" I might have answered that you need to buy a different car.
IMO this is a basic feature that should be standard in any PR process. Github, Gitlab, etc. all do it but Atlassian have chosen to lock it away behind a paywall... thus my answer is to move to a provider that has it available.
Since you're obviously on a free account, or this wouldn't be an issue, moving to another provider would seem a sensible option and migrating a git repo to another provider and retaining history is relatively easy.
I know it's more than a year old but I just stumbled over that on.
@lee_conlin your comments are indeed not very helpful :
You could have just keep your fingers shut since the information "you need a premium plan" was already given.
I am assuming your intent wasn't to be helpful in answering the OP but just to troll Bitbucket for not providing a (IYO) "standard feature".
Sorry, I had to comment here. I just cannot stand that trolly non-helpful attitude.
Welcome to the Atlassian Community!
It would seem you need a Premium Plan to do this as it mentions in this document here. With the Premium plan you gain access to "Reset approvals when the source branch is modified."
That is for Cloud, if you are using Bitbucket Server the Auto Unapprove for Bitbucket Server is what you are looking for.
Dev Tools Support Engineer
Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events