Via the Java Api can I programatically update plan branch configuration

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

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.

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
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

63 views 3 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you