0

We are trying to improve our merge process by protecting specific branches from merge of any unapproved pull request.

The developer create a pull request and he/she can´t merge it until it is at least from one reviewers approved.

How to protect specific branches from such merges using Bitbucket api ? Or is there another way to achieve that goal ?

Thanks a lot in advanced

torek
  • 448,244
  • 59
  • 642
  • 775
Stefan
  • 160
  • 1
  • 11

2 Answers2

1

Go to "Repository settings" (admin rights on the repo needed), then in "Pull requests", click on "Default reviewers"

enter image description here

Here you can set how many reviewers must give their approval for a pull request to be mergeable.

enter image description here

See the Atlassian help page about it here.

Romain Valeri
  • 19,645
  • 3
  • 36
  • 61
  • Unfortunately this is not what I need in my question. – Stefan Aug 01 '22 at 09:02
  • 1
    @Stefan I'm afraid you're right. This bitbucket web UI is specific and I realize it must be different from the one you have. Sorry for the noise, I let this here in the odd case it could help someone else later on. – Romain Valeri Aug 01 '22 at 09:24
1

See https://support.atlassian.com/bitbucket-cloud/docs/suggest-or-require-checks-before-a-merge/

Unfortunately the thing you want, aka enforce these rules, is only available in the premium plan.

Bitbucket merge conditions

Randommm
  • 410
  • 1
  • 9