Represents a Bitbucket pull request resource with chainable async methods.

Implements PromiseLike<BitbucketPullRequest> so it can be awaited directly to fetch the pull request info, while also exposing sub-resource methods.

// Await directly to get pull request info
const pr = await bbClient.project('PROJ').repo('my-repo').pullRequest(42);

// Get activities
const activities = await bbClient.project('PROJ').repo('my-repo').pullRequest(42).activities();

// Get tasks
const tasks = await bbClient.project('PROJ').repo('my-repo').pullRequest(42).tasks();

// Get commits
const commits = await bbClient.project('PROJ').repo('my-repo').pullRequest(42).commits();

// Get changes
const changes = await bbClient.project('PROJ').repo('my-repo').pullRequest(42).changes();

// Get reports
const reports = await bbClient.project('PROJ').repo('my-repo').pullRequest(42).reports();

// Get build summaries
const builds = await bbClient.project('PROJ').repo('my-repo').pullRequest(42).buildSummaries();

// Get linked Jira issues
const issues = await bbClient.project('PROJ').repo('my-repo').pullRequest(42).issues();

Implements

Methods

  • Fetches the aggregated build summaries for this pull request.

    Returns a map of commit hash → build counts per state (successful, failed, inProgress, cancelled, unknown).

    GET /rest/api/latest/projects/{key}/repos/{slug}/pull-requests/{id}/build-summaries

    Returns Promise<BitbucketBuildSummaries>

    A record keyed by commit SHA with aggregated build counts