Auto removal of PR approvals based on custom rules
Asked by GPVCMANI:

Dear team,

I know under premium plan, there is feature in bitbucket to remove approvals if new commits are pushed to open PRs that already has approvals. We use that feature a lot.

I am curious to know whether we can go one step further and configure unapproval based on various business rules. Like remove approval only if certain files are changed like podlock(cocoapods).

we are looking at opportunities to reduce effort of reviewers for prs that already has been reviewed and draw their attention only if needed in case of special conditions?


Answers:
author: Theodora Boudale
body: Hi [@GPVCMANI](/t5/user/viewprofilepage/user-id/4414046) and welcome to the community.

Does your question concern repos hosted in Bitbucket Cloud (<https://bitbucket.org/>) or in Bitbucket Server (self-hosted instance)?

I see that your post has the tag 'bitbucket-server', but you are referring to the premium plan, which is a billing plan for Bitbucket Cloud. So, I just want to make sure we know which product you are using and are referring to.

For Bitbucket Cloud specifically, I'm afraid that what you are asking is not possible at the moment. You are more than welcome to open a feature request for this in our [issue tracker](https://jira.atlassian.com/secure/Dashboard.jspa), explaining your use case as well, for our product managers to take into account.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html).

Please let me know if you're using Bitbucket Server instead, so I can reach out to the appropriate team and ask.

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora

comments: author: GPVCMANI
body: Thanks a lot for your quick turnaround ?.

My question was specific to bitbucket server(self - hosted)

thanks

mani


author: Theodora Boudale
body: Hi Mani,

Thank you for your reply!

I checked with Bitbucket Server team and the functionality of automatically removing PR approvals is not available in Bitbucket Server.

There is a plugin for Bitbucket Server that offers this feature:

* [https://marketplace.atlassian.com/apps/1211449/auto-unapprove-for-bitbucket-server?hosting=server\&tab=overview](https://marketplace.atlassian.com/apps/1211449/auto-unapprove-for-bitbucket-server?hosting=server&tab=overview)

I'm not sure if you're already using that?

With this plugin, removal of approvals occurs when new commits are pushed to the pull request's source branch, or the pull request is updated to target a different branch. I don't see any options to remove approvals based on custom rules though.

Since this plugin is developed by Atlassian, my suggestion would be to open a feature request in our [issue tracker](https://jira.atlassian.com/secure/Dashboard.jspa) for our development team to take into account. Please select 'Bitbucket Server' as project and mention that the enhancement request concerns this specific plugin, so that unapproval will be possible based on other rules you set as well.

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


Tags: bitbucket-server

server