Hi Srinath, you can automate this by using the Bitbucket REST API, but you'll need to authenticate. The Bitbucket API grants access to public data without authentication, but access to private data requires the caller to authenticate under an account with the appropriate access. Adding or changing branch permissions requires project admin privileges.
You can find more information about the REST API at https://developer.atlassian.com/static/rest/bitbucket-server/latest/bitbucket-rest.html#idm45669359596592 (if you're using Bitbucket Server) or https://developer.atlassian.com/cloud/bitbucket/about-bitbucket-cloud-rest-api/ (if you're using Bitbucket Cloud).
Hope that helps!
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs