I need an API to update the repositories branch field.

sunil jaiswal August 12, 2023
  • I have one bamboo plan that has two repositories repo1, and repo2.
  • Repo1 branch points to the master and Repo2 branch points to develop. 
  • But that plan has multiple plan branches like release_1_0_0, release_1_1_0, etc. So here each plan branch Repo1 point to branch release_x_x_x.
  • Now when I create new bamboo plan branches the repo's branches point to default branches. manually we can update the, but I want to update the branch so that its point to different branch that I want using API call.
  • The field that I want to update using API call you can see in the pic given below.

Screenshot 2023-08-12 131924.png

Screenshot 2023-08-12 132038.png

 

 

1 answer

1 vote
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 15, 2023

Hello @sunil jaiswal,

To achieve that, you must use configuration-as-code in Bamboo. Configuration as code is achievable through Bamboo Specs.

Specifically for your requirement, only Java Specs will support such customisation as the YAML implementation in Bamboo still does not have that feature.

Check the links below for more information and example code:

Sincerely,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events