Skip to main content
The cops bitbucket commits commands let you browse commit history and check CI build results. They call the Bitbucket REST API (/rest/api/1.0) and the Bitbucket build-status API (/rest/build-status/1.0).

cops bitbucket commits list

List commits for a Bitbucket repository. Optionally scope the listing to a specific branch.Alias: cops bitbucket commits ls

Usage

cops bitbucket commits 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).
--branch
string
Branch name to scope the commit listing to (without the refs/heads/ prefix). If omitted, commits from all branches are returned.
--limit
number
default:"50"
Maximum number of commits 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, shortId, author, message, timestamp

Examples

cops bitbucket commits list --project MYPROJ --repo my-service
id                                        shortId   author         message                        timestamp
────────────────────────────────────────  ────────  ─────────────  ─────────────────────────────  ─────────────
a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2  a1b2c3d4  Alice Example  Bump dependency versions       1742000000000
9f8e7d6c5b4a9f8e7d6c5b4a9f8e7d6c5b4a9f8e  9f8e7d6c  Bob Example    Add retry logic to auth client  1741900000000
Get CI build statuses for a specific commit SHA. Returns all build status entries reported by connected CI systems.Alias: cops bitbucket commit status

Usage

cops bitbucket commit build-status <commit> [flags]

Arguments

ArgumentRequiredDescription
commitYesFull commit SHA

Flags

--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

key, name, state, description, url, dateAdded

Examples

cops bitbucket commit build-status a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2
key              name          state      description         url                                         dateAdded
───────────────  ────────────  ─────────  ──────────────────  ──────────────────────────────────────────  ─────────────
bamboo-build-1   Unit Tests    SUCCESSFUL  All tests passed    https://bamboo.example.com/browse/MYP-JOB1  1742000000000
bamboo-build-2   Integration   FAILED      2 tests failed      https://bamboo.example.com/browse/MYP-JOB2  1742000100000
Build status entries are reported by CI tools integrated with your Bitbucket Data Center instance (e.g. Bamboo). If no integrations are configured, the output will be empty.

cops bitbucket branch

List branches and check whether a branch exists.

cops bitbucket pr

List pull requests and run PR readiness checks.

Build docs developers (and LLMs) love