Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

pull-request merge check - do not remove approvals if branch is updated with no changes in pull-requ

Hi Team,

Whenever we sync our feature branch, then the existing pull request to development branch will not have the changes because that is already present in dev branches. But if there were approvals and then we sync, it will remove the approvals. We do not want it to remove if there are no code changes in pull-request. Please let me know if we can achieve this. 

2 comments

Jimmy Seddon Community Leader Aug 27, 2019

Hi @Rajeev Naik,

Just so I have a clear understanding of what you are asking, if you have a feature branch let's call it "Feature A", you do some work on that branch and when you are ready you create a pull request targeting the development branch.  Because your reviewers weren't fast enough, there are changes that you need to sync into your feature branch from the development branch before you can merge your pull request.  When you sync these changes, the approvals on the pull request are being removed automatically?  Is this correct?

Can you also let me know if you are using the Cloud or Server version of BitBucket and if you are on server what version of Server you are running.

We are running Server version 6.4.0 and from what I have seen the only time approvals are removed is if you have this setting checked:

PullRequestSettings.JPG

And when you performed the sync from the development branch there were conflicts that required a new commit to be created to resolve the conflicts.

I hope that helps!

-Jimmy

Hi, @Jimmy Seddon Thank you for your comment.

I was expecting this checkbox to be conditional. i.e. unapprove automatically only if the new change is visible in pull-request.

Example, say am working on 'Feature A' branch (created from master) and have commit and pull-request to development branch is open and got reviews. Another person worked on another branch 'Feature B' and made some code changes, then moved to the development branch and then moved to the master branch. Now I will try to sync my branch with master. In this case, I will get 'Feature B' changes into my branch. Since it is also in the development branch, there won't be any new code changes in pull-request to review (not considering the conflict scenario). So, we don't want it to remove approvals.

We are using cloud service.

I don't think there's anything for Bitbucket Cloud to handle this problem - at least not yet. If you were on Bitbucket Server (on-prem Bitbucket) I would tell you to look into two plugins (one free, one paid):

1.  Auto Unapprove for Bitbucket Server (free) - changelog for version 2.2.0 shows how it switched its logic to implement dropping approvals as per the logic you're requested here (e.g., sync merges should not cause approvals to drop).

2.  PR-Booster for Bitbucket Server (paid) - set the "Automatically Withdraw Approvals" setting to "Yes - For Significant Pushes".

 

Full disclosure:  my company maintains the paid "PR-Booster for Bitbucket Server" plugin.

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,922 views 0 7
Read article

Community Events

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

Events near you