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!
As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...
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