PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Pull requests comments

Manage pull requests comments.

Prepare:

// @see: https://bitbucket.org/account/user/<username or team>/api
$oauth_params = array(
    'client_id'         => 'aaa',
    'client_secret'     => 'bbb'
);

$pull = new \Bitbucket\API\Repositories\PullRequests();
$pull->getClient()->addListener(
    new \Bitbucket\API\Http\Listener\OAuth2Listener($oauth_params)
);

Get a list of a pull request comments:

$pull->comments()->all($account_name, $repo_slug, 1)

Get an individual pull request comment:

$pull->comments()->get($account_name, $repo_slug, 1, 2)

Add a new comment:

$pull->comments()->create($account_name, $repo_slug, 41, "dummy content");

Update an existing comment:

$pull->comments()->update($account_name, $repo_slug, 41, 4, "dummy content [edited]");

Delete a pull request comment

$pull->comments()->delete($account_name, $repo_slug, 41, 4);