Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Avoid merging in a branch that has open PR

Simone Fumagalli June 13, 2018

We use a simplified version of the GitFlow.

All devs merge branches in `dev` branch. When we want to release we merge `dev` into `master` and we release.

I would like to temporary disable the possibility to merge into `dev` if there is an open PR from `dev` to `master`

Once the PR `dev` -> `master` has been merged merging into `dev` still became available.

Is this possible ?

1 answer

0 votes
Alexey Matveev
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.
June 13, 2018

Hello,

You should limit users who can merge into the dev branch. You can do it by opeing your repository then choose Repository Settings -> Branch Permissions and add permissons for the dev branch.

Simone Fumagalli June 13, 2018

I don't want do that. I want everyone be able to merge in `dev` and I want to avoid ppl merge in `dev` when a PR from `dev` to `master` is open.

Alexey Matveev
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.
June 13, 2018

I see. then you should set permissions not on the dev branch, but on the master branch.

Simone Fumagalli June 15, 2018

I don't understand how this can solve my problem. I've changed a bit my question to make it more clear.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events