Hey everyone!
I’m currently working on a Forge App and ran into a bit of a mystery with Bitbucket’s API. I’m trying to fetch inherited branch restriction settings from a repository, and here’s what I’ve encountered:
Here’s how the branch restriction settings are configured in the UI:
When I query the API using the branch-restrictions
endpoint, I only get this response:
{
"values": [],
"pagelen": 10,
"size": 0,
"page": 1
}
There’s no information about inheritance in the repository settings!
The API does provide inheritance details for some settings, like:
{
"default_merge_strategy": true,
"branching_model": true
}
…but sadly, not for branch restrictions.
Has anyone successfully retrieved inherited branch restriction settings any forge tools?
Any tips, insights, or workarounds would be super appreciated!
(Especially if you’ve dealt with something similar while building a Forge App!)