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

Via the Java Api can I programatically update plan branch configuration

Lee Myring August 19, 2014

Hello,

Every time I create a new Git branch for a new sprint I want to update the Plan Branch's Source Repository Branch value to the newly created branch. For example sprint/2 is the current branch name and there's now a new branch called sprint/3 that I wish to update it to.

My Plan Branches are fixed. I DO NOT want to have automatically generated plan branches when new git branches are detected (which I used to do but my plan branch variables needed to be updated in the newly generated plan branch and that became too much manual work)

So I would like to create a simple Java program that will iterate over all my plans and update the sprint plan branches to the new git branch. Is this possible? I saw the docs (https://docs.atlassian.com/atlassian-bamboo/latest/) which were frankly overwhelming for a non-developer and I was hoping someone could point me in the right direction to get me started

Many thanks

1 answer

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 19, 2014

In your case it would be easiest if submitted the action /branch/admin/config/editChainBranchRepository.action?buildKey=YOUR_BRANCH_NAME and captured what gets sent to the server using FireBug or some other plugin.

Using that data, you'll be able to create a Java program (or even a simple script that uses curl - http://curl.haxx.se/) that updates the branch name to what you want.

Lee Myring August 28, 2014

Thanks for this but I have captured a lot of data and not really sure how that helps me in any way? Any other clues please?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events