Skip to content
Jents Academy
Integrations 3 min read

Bitbucket

Connect Bitbucket Cloud to measure what your coding agents ship, pull requests, commits, and how fast they merge.

What you can measure

  • Count of Pull Requests or Commits over a window.
  • Average / sum / min / max Time to merge (hours) on PRs.
  • Filter by repository, workspace, author, state, target branch, source branch, reviewer.

Good things to measure: PRs merged per week, commits shipped, time-to-merge trending down.

Connect it

In Bitbucket, an admin creates an OAuth consumer once (Workspace settings → OAuth consumers → Add) with permissions Repositories: Read and Pull requests: Read, then gives the callback URL Jents shows you.

In Jents, Settings → IntegrationsBitbucketConnect → authorize.

You enter your workspace when you connect (the name in your Bitbucket URL: bitbucket.org/<workspace>). Atlassian removed the API that listed the workspaces a token can reach, so this is now the only way to find your repositories — and asking once is what keeps Jents on read-only repository access instead of the far broader Account permission.

Tip: add a repository filter (workspace/repo) on your metric. Bitbucket has no cross-repo search, so a metric with only a workspace fans out across every repo in it, which is slower and usually broader than you meant.

What Jents reads

Counts come from Bitbucket's own result total where it provides one, otherwise from counting matching records page by page. Time-to-merge is computed from PR timestamps. Never code, diffs, or file contents.

Two Bitbucket details worth knowing, because they affect the numbers:

  • "Merged date" isn't a field Bitbucket stores. A merged PR's last update is its merge, so Jents windows on updated_on and pins state = MERGED. A PR commented on long after merging can land in a later period.
  • If a window is too large to count completely, Jents shows an error instead of a partial number. Narrow the period or add a repository filter.

Specs

SpecDetail
AuthOAuth 2.0 (Repositories: Read, Pull requests: Read)
APIBitbucket Cloud REST 2.0 (BBQL filtering)
AccessRead-only, scoped
ReadsCounts per repository; merge-time from timestamps
RefreshDaily, plus on-demand
Not supportedBitbucket Server / Data Center (self-hosted), and the per-repo issue tracker — use Jira for issues

Privacy & security

Read-only, counts and timestamps, never code or diffs. Every read goes through one audited, aggregate-only path and lands in your audit log. Credentials are encrypted at rest, we never train on or share your data, and you can disconnect anytime, see Privacy and Trust.

Helpful links

Next in Integrations
Jira