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!
Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...
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