Build Statuses
Manages build statuses on a commit.
Prepare:
$buildStatuses = new Bitbucket\API\Repositories\Commits\BuildStatuses();
$buildStatuses->setCredentials( new Bitbucket\API\Authentication\Basic($user, $password) );
Get the build status for a commit: (API 2.0)
$buildStatuses->get($account, $repository, $revision, $key);
Adds a build status to a commit: (API 2.0)
$buildStatuses->create($account, $repository, $revision, array(
'state' => 'FAILED',
'key'=> 'JENKINS-PROJECT-X',
'name'=> 'Build #1',
'url'=> 'https://example.com/path/to/build/info',
'description'=> 'Changes by John Doe'
));
Updates the build status for a commit: (API 2.0)
$buildStatuses->update($account, $repository, $revision, $key, array(
'state' => 'SUCCESSFUL',
'name'=> 'Build #2',
'url'=> 'https://example.com/path/to/build/info',
'description'=> 'Changes by John Doe'
));