Hello,
I am trying to use the Python API to automate some processes in the bitbucket cloud.
I am establishing a connection via:
self.cloud = Cloud(username=self.username, password=self.password, token=self.token)
I am able to perform the following:
1.Get all the workspaces.
2. Get all the projects inside a workspace.
3. Get all the repos inside a project.
4. Get all the branches inside a repo.
5. Create new branches (based on that hash of the mainbranch read from the repo using get_data("mainbranch")["name"]
What I couldn't figure out yet:
1. When trying to get a list of branch_restrictions for a repo (by repo.branch_restrictions.data) I get an empty string {}
2. When trying to get a list of branch_restrictions using repo.branch_restrictions.each() I get error 403 (I am admin for the workspace, project and repo).
3. When trying to get a list of pullrequests for a repo (repo.pullrequests.data) I also get a blank string {}.
Can you share an example on how to get branch_restrictions / pullrequests for a given repo?
Thank you!