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
cops bitbucket pr list
List pull requests for a Bitbucket repository, filtered by state.Alias:
cops bitbucket pr lsUsage
Flags
Bitbucket project key (e.g.
MYPROJ).Bitbucket repository slug (e.g.
my-service).Pull request state filter. Accepted values:
OPEN, MERGED, DECLINED.Maximum number of pull requests to return.
Output format:
table, json, or markdown.Disable TLS certificate validation. Use only with self-signed certificates in trusted networks.
Override the active config profile.
Output columns
id, state, title, from, toExamples
cops bitbucket pr checks
cops bitbucket pr checks
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
Flags
Bitbucket project key (e.g.
MYPROJ).Bitbucket repository slug (e.g.
my-service).Release branch name to check (e.g.
release/2026-06).Maximum number of open pull requests allowed to target the release branch. Exceeding this threshold produces a
warn result.Output format:
table, json, or markdown.Disable TLS certificate validation. Use only with self-signed certificates in trusted networks.
Override the active config profile.
Output columns
check, status, detailsEach row represents one check. The status value is pass or warn.| Check | Description |
|---|---|
open_prs_to_release | Number of open PRs targeting the release branch is within --maxOpenToRelease |
merged_prs_to_release | At least one PR has been merged into the release branch |
Exit codes
| Code | Meaning |
|---|---|
0 | All checks passed |
1 | One or more checks produced warn |
Examples
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.Related
cops bitbucket branch
Check whether a release branch has been cut.
cops bitbucket commits
List commits and inspect build statuses.
