I'm creating repositories in BitBucket Cloud and I'm looking for a way to configure the main branch. If I use a simple request as in API documentation in response I see "mainbranch": null. I tried to add a mainbranch parameter to the request body but it's ignored. Actually it looks like any unsupported parameter is ignored.
So the question is how to configure the main branch via API?
Hi @v-hleb_v ,
I'm afraid that it is not possible to configure the main branch of a repo via API.
We have a feature request for supporting the main branch update via API (with the PUT method) for existing repos:
I went ahead and created an additional one for setting up the main branch on repo creation (with the POST method) as well:
I would suggest that you add your vote in the feature requests (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.
Implementation of new features is done as per our policy here and any updates will be posted in the feature requests.
Please feel free to let me know if you have any questions.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events