b15
b15

Reputation: 2361

How to merge a pull request from a bamboo build

I see "How to trigger a bamboo build from a pull request" all over the internet, but I want to do the opposite.

Right now, we have a team of around ten people working on a git repository from their own forks, each of which have their own branches for each task. When a developer is finished testing their feature they create a pull request from their feature branch to upstream master. Someone has to constantly tell developers to rebase so that the pull request can be merged. My team is trying to simplify our git workflow and we basically want a build that automates that process by doing the following:

This way we would just use the global merge build's queue as a merge queue and developers could manage it ourselves without all the back and forth messaging about rebasing with some person basically acting as a server for this process.

This would require bamboo to be able to merge a pull request so my question is: is there a direct integration that allows me to do this? If not then how do I merge a pull request via a script? An example/detailed explanation would be helpful.

Upvotes: 1

Views: 2212

Answers (1)

Vidish Datta
Vidish Datta

Reputation: 192

Any particular reason for using forks? I believe bamboo is more compatible with branches as compared to forks. If you work with branches, there are some cool features available as below:

Bamboo provides a capability of auto merging your master code into branches. Please see excerpt below from https://confluence.atlassian.com/bamboo/using-plan-branches-289276872.html and under topic Automatic branch merging

Bamboo provides 2 merging models if you choose to automate your branch merging:

Branch Updater — a branch repo is kept up-to-date with changes to master.
Gatekeeper — the default repo is only updated with changes in the branch that have built successfully.

The automatic branch merge strategy for the master plan can be overridden in an individual plan branch if required.

In addition, you can configure a trigger on plan branches and thereby always build the plan branch on each commit.

Upvotes: 3

Related Questions