Skip to main content
The cops bitbucket pr commands let you inspect pull requests and validate release-branch readiness. They call the Bitbucket REST API (/rest/api/1.0).

cops bitbucket pr list

List pull requests for a Bitbucket repository, filtered by state.Alias: cops bitbucket pr ls

Usage

cops bitbucket pr list --project <projectKey> --repo <repoSlug> [flags]

Flags

--project
string
required
Bitbucket project key (e.g. MYPROJ).
--repo
string
required
Bitbucket repository slug (e.g. my-service).
--state
string
default:"OPEN"
Pull request state filter. Accepted values: OPEN, MERGED, DECLINED.
--limit
number
default:"50"
Maximum number of pull requests to return.
--output
string
default:"table"
Output format: table, json, or markdown.
--insecure
boolean
default:"false"
Disable TLS certificate validation. Use only with self-signed certificates in trusted networks.
--profile
string
Override the active config profile.

Output columns

id, state, title, from, to

Examples

cops bitbucket pr list --project MYPROJ --repo my-service
id   state  title                          from                   to
───  ─────  ─────────────────────────────  ─────────────────────  ───────────────
47   OPEN   Add retry logic to auth client  feature/retry-auth     main
46   OPEN   Bump dependency versions        chore/dep-updates       main
Run release-branch PR readiness checks. Verifies that the number of open pull requests targeting the release branch does not exceed a configured threshold, and that at least one PR has been merged into the release branch. Exits with code 1 if any check produces a warn result.

Usage

cops bitbucket pr checks --project <projectKey> --repo <repoSlug> --releaseBranch <branch> [flags]

Flags

--project
string
required
Bitbucket project key (e.g. MYPROJ).
--repo
string
required
Bitbucket repository slug (e.g. my-service).
--releaseBranch
string
required
Release branch name to check (e.g. release/2026-06).
--maxOpenToRelease
number
default:"0"
Maximum number of open pull requests allowed to target the release branch. Exceeding this threshold produces a warn result.
--output
string
default:"table"
Output format: table, json, or markdown.
--insecure
boolean
default:"false"
Disable TLS certificate validation. Use only with self-signed certificates in trusted networks.
--profile
string
Override the active config profile.

Output columns

check, status, detailsEach row represents one check. The status value is pass or warn.
CheckDescription
open_prs_to_releaseNumber of open PRs targeting the release branch is within --maxOpenToRelease
merged_prs_to_releaseAt least one PR has been merged into the release branch

Exit codes

CodeMeaning
0All checks passed
1One or more checks produced warn

Examples

cops bitbucket pr checks --project MYPROJ --repo my-service --releaseBranch release/2026-06
check                   status  details
──────────────────────  ──────  ───────────────────────────────────────────────────────
open_prs_to_release     pass    0 open PR(s) targeting release/2026-06; threshold 0
merged_prs_to_release   pass    3 merged PR(s) targeting release/2026-06
The command fetches up to 500 open and 500 merged pull requests. For very active repositories, increase the per-page limit in the Bitbucket API or filter results more narrowly using cops bitbucket pr list.

cops bitbucket branch

Check whether a release branch has been cut.

cops bitbucket commits

List commits and inspect build statuses.

Build docs developers (and LLMs) love