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

Can I block merging PRs with a especific branch as origin?

Pablo Hernando Izquierdo August 30, 2023

Hello,

I was looking to secure a branch, by not only blocking people to merge to the branch but also from the branch.

So if the origin of the pull request is production, only a group of people can merge that pull request.

 

Many thanks.

2 answers

1 vote
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 31, 2023

Agree with the comment by @Saxea _Flowie_ - there are a few more apps that support your requirement:

  1. Workzone for Bitbucket Cloud by Izymes (UI based configuration)
  2. Code Owners for Bitbucket By Mibex Software (code based configuration)

Please let me know if I can help you any further with your setup.

Cheers, Ulrich

Pablo Hernando Izquierdo September 4, 2023

Hello,

First thing Tanks for your answer.

Im working with Bitbucket Cloud, wich of those are supported for it? Also, does any of this plugins block merging in local, and then pushing the changes?

Many thanks.

Pablo.

1 vote
Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 30, 2023

Bitbucket built in branch permissions are only based on target branch.

However, Flowie, which is a Bitbucket app is capable of restricting based on other aspects, including the source and/or target branch. You can use the merge plugin with conditions.

Pablo Hernando Izquierdo September 4, 2023

Hello,

First thing Tanks for your answer.

Ive tried tio use flowi, but i cant get it to work in my test repository, how would the flowie settings would be for this merge checks?

Also, does it block merging in local?

Many thanks.

Pablo.

Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2023

Hi @Pablo Hernando Izquierdo

To block locally you need to use git hooks. Flowie (and any other plugins/add) only blocks remote/Bitbucket.

You would need to use the condition. Something like this:

import {configure} from "flowie.app"
import {merge} from "flowie.app/plugins"
import {target, source} from "flowie.app/conditions"

configure({

plugins: [
merge([
source("production").and(target("master")),
{

allow: ["Team leaders group"]
},
]),

],

})

I suggest you reach out on the support channels of the website(email or chat) which is easier for us to help you, as we probably need more details for a complete config.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events