Open
Description
Hi there,
Just discovered that the branching-model calls are literally the repository settings. Not the inherited settings, if configured. With the effective-branching-model, this should be fixed.
use Bitbucket\Api\Repositories\Workspaces\AbstractWorkspacesApi;
use Bitbucket\HttpClient\Util\UriBuilder;
class EffectiveBranchingModel extends AbstractWorkspacesApi
{
public function show(array $params = []): array
{
$uri = $this->buildEffectiveBranchingModelUri();
return $this->get($uri, $params);
}
protected function buildEffectiveBranchingModelUri(string ...$parts): string
{
return UriBuilder::build('repositories', $this->workspace, $this->repo, 'effective-branching-model', ...$parts);
}
}
In the workspaces part;
public function effectiveBranchingModel(string $repo): EffectiveBranchingModel
{
return new EffectiveBranchingModel($this->getClient(), $this->workspace, $repo);
}