gentle/bitbucket-api
PHP Bitbucket API wrapper (PHP 5.4+) using cURL and Buzz. Provides a simple client for interacting with Bitbucket endpoints, with full documentation and optional PHPUnit test suite. MIT licensed.
Manage branch restrictions on a repository
{% include auth.md var_name="restrictions" class_ns="Repositories\BranchRestrictions" %}
$restrictions->all($account_name, $repo_slug);
Restrict push access to any branches starting with joe-and-mary- only to users joe and mary:
$restrictions->create($account_name, $repo_slug, array(
'kind' => 'push',
'pattern' => 'joe-and-mary-*',
'users' => array(
array('username' => 'joe'),
array('username' => 'mary')
)
));
$restrictions->get($account_name, $repo_slug, $restrictionID);
$restrictions->update($account_name, $repo_slug, $restrictionID, array(
'users' => array(
array('username' => 'joe'),
array('username' => 'mary'),
array('username' => 'joe-work')
)
));
$restrictions->delete($account_name, $repo_slug, $restrictionID);
How can I help you explore Laravel packages today?