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

how to set mainbranch in bitbucket via api v2

shigapov March 27, 2019

I connect to the question, I need to periodically create new branches and change main branch

but I can not appoint main branch

this action is not mentioned in the documentation

this:

https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D#put

not working, I send

{'mainbranch':{
'type': 'branch',
'name': 'branch_name'}
}

and https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/src

not working, I send

{'parents': 'master', 'branch': 'branch_name'}

 

1 answer

2 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 1, 2019

Hello Денис

With the v2 API being so new we have noticed a few people asking the same. This short answer if you can make modifications to the main branch within the v2 API is no. The longer answer is there are feature requests and there is more to come within the v2 API in the future. With the changes spawned from GDPR, there is work that needs to be done beforehand. There is a feature request I would suggest you vote and watch to receive updates on its status. You may find this request at Issue #13306.

I hope this proves helpful and helps to clarify what is possible within the v2 API.

Regards,
Stephen Sifers

shigapov April 2, 2019

I understand everything, but the task has been hanging since 2016, how many votes do you need to solve this problem?

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 2, 2019

Hello Денис,

Feature requests don’t always come down to votes themselves, there are other factors which may cause one feature to move to production and other features to have to wait. The best explanation of how new features get approved is within the Implementation of New Features Policy. This policy explains all of what is evaluated when a new feature gets approved.

I hope this is helpful in explaining what is needed to approve a feature request.

Regards,
Stephen Sifers

Chris Raver
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 29, 2021

@Stephen Sifers a year later and this hasn't been prioritized or worked on. what gives?

Nadeem Shahbaz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 24, 2022

so almost a year again and yet feature is not implemented. What it will take to prioritize this feature, if voting doesn't play a role ?

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events