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.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.