Forums

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

merge from prod to other branches

Deepak Rajagopal April 27, 2018

We have a branch structure as under .

prod

|

int

|

test

|

master=dev

 

We might have hot fix branches under prod which get merged via pull request to prod.

We want these hot fix changes to cascade through master->test->int automatically.

so far with bitbucket server (we run server) we are able to have this happen from prod to dev/master. Any idea how we could do this for the other branches?

 

I started looking into a plugin to do so but don't know how to merge the changes within the pull request hook. Looked at your previous auto merge code but it uses a merge call from ScmCommandFactory which doesn't exist in the new api .

 

Any help would be appreciated.

1 answer

0 votes
Aaron
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2018

Hello,

 

Welcome to Atlassian Community!

 

As of right now, it isn't possible for what you are asking natively inside Bitbucket. How Automatic Merging works, is either cascading through semantic versions of the release branch type or cascading through the production branch into the development branch. 

I suppose you could workaround this by bringing all of those branches under the release branch type and have naming like release/1.0-int and release/1.0-test and merging into int will cascade into test. But I believe the only reason this works is because of the way Bitbucket sees the version numbers (I comes before T so it sees 1.0-test as a later version).

 

In terms of that plugin that you said you were looking into, could you let me know what plugin it is? Or when you said you were looking into a plugin to do so, you meant you were writing one yourself?

 

Regards,
Aaron Levinson
Dev Tools Support Engineer

Deepak Rajagopal June 28, 2018

Thanks @Aaron

We wanted to write our own. As I mentioned we looked at previous (I believe prior to Bitbucket when the product was called Stash) code which did automerges and it made calls which no longer exist.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events