Skip to main content
The cops bitbucket command group provides read and validation operations against a Bitbucket Data Center instance. Commands use the active profile configured with cops auth login, or the profile you specify with --profile.

Quick reference

CommandDescription
cops bitbucket repo getFetch repository details
cops bitbucket branch listList branches in a repository
cops bitbucket branch existsCheck whether a branch exists
cops bitbucket pr listList pull requests
cops bitbucket pr checksRun release-branch PR readiness checks
cops bitbucket commits listList commits for a repository or branch
cops bitbucket commit build-status <commit>Get CI build statuses for a commit

Command groups

cops bitbucket repo

Fetch repository details by project key and repository slug.

cops bitbucket branch

List branches and check whether a specific branch exists.

cops bitbucket pr

List pull requests by state and run release-branch readiness checks.

cops bitbucket commits

List commits for a repository or branch and inspect CI build statuses.

Common flags

All cops bitbucket subcommands accept the following flags:
FlagTypeDefaultDescription
--outputtable | json | markdowntableOutput format
--insecurebooleanfalseDisable TLS certificate validation
--profilestringactive profileOverride the active config profile
Most subcommands also require:
FlagTypeDescription
--projectstringBitbucket project key (e.g. MYPROJ)
--repostringBitbucket repository slug (e.g. my-service)
--insecure disables TLS certificate validation and exposes traffic to MITM attacks. Use it only with self-signed certificates in trusted networks.

Prerequisites

You must have a Bitbucket profile configured before running any cops bitbucket command.
cops auth login
See Auth profiles for details on setting up and managing profiles.

Build docs developers (and LLMs) love