You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Basically I want to be able to add the branch restriction shown in this article through Bitbucket REST API to automate the setup of new repositories:
Anyone who have done this before could share the details on how to achieve this?
I'm afraid that this is not possible via API at the moment.
We have a feature request about this in our issue tracker:
You can add your vote (by selecting the Vote for this issue link) and leave a comment there to express your interest.
Please have a look at the Bitbucket/Pipelines REST API
I couldn't find a detailed data model, but I suppose you can fetch an existing config via https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-config-get
Hope that helps,