Commits
Retrieve and compare information about commits.
Prepare:
$commits = new Bitbucket\API\Repositories\Commits();
$commits->setCredentials( new Bitbucket\API\Authentication\Basic($bb_user, $bb_pass) );
Get all commits for a repository: (API 2.0)
$commits->all($account_name, $repo_slug);
Get all commits for a single branch: (API 2.0)
$commits->all($account_name, $repo_slug, array(
'branch' => 'master' // this can also be a tag
));
Get an individual commit: (API 2.0)
$commits->get($account_name, $repo_slug, $commitSHA1);
Approve a commit: (API 2.0)
$commits->approve($account_name, $repo_slug, $commitSHA1);
Delete a commit approval: (API 2.0)
$commits->deleteApproval($account_name, $repo_slug, $commitSHA1);