Skip to content

Dataset

Bitbucket repository and pull request datasets for AI training

A Bitbucket dataset is a company's Git repositories together with the review record Bitbucket keeps around them: pull requests with their activity, inline comments, tasks and approvals, and Bitbucket Pipelines runs with their steps where the company used Pipelines. SourceX sources it to a buyer's spec from established businesses that run Bitbucket Cloud or Bitbucket Data Center, and the delivery states which of the two products it came from. Each dataset is de-identified and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
Git repositories with their pull requests, pull request activity, inline comments, tasks, approvals and build results
Typical systems
Bitbucket Cloud workspaces with Bitbucket Pipelines, or self-managed Bitbucket Data Center and the older Bitbucket Server, usually beside Jira
Typical history
Commits as far back as the repository goes; pull requests from when the team adopted them; build logs as far as they were kept
Modality
Source code with Git history, review text, and structured activity and build records
Delivery formats
Git bundle or mirror clone per repository; JSONL for pull requests, activity, comments and builds; step logs as text
Preparation
People replaced with stable keys; code, commit messages, comments and build logs screened for secrets
Licensing
Scoped per workspace or project and per repository; ownership of contractor, client and third-party code reviewed
Availability
Sourced to your spec from businesses that run Bitbucket; supply is not guaranteed
CodeIllustrative

What a delivery contains

Fields vary by source system and are fixed per order. A typical delivery includes:

FieldTypeWhat it holds
source_productobjectBitbucket Cloud or Bitbucket Data Center, with the Data Center release where it applies.
repositoryobjectWorkspace, Project key and repository slug on Cloud; Project key and slug on Data Center.
pull_request_idintegerThe Pull request's ID, numbered within one Repository on both products.
titlestringThe Pull request's current title, where an issue key most often appears; the description is often empty.
stateenumOPEN, MERGED or DECLINED on both products, plus SUPERSEDED on Cloud.
refsobjectSource and destination Branch names and Commit hashes (fromRef and toRef on Data Center), with the merge commit.
jira_issue_keysarrayIssue keys parsed from the Branch name, title and Commit messages, with where each was found and whether it resolves to a delivered Jira issue.
commitsarrayEach Commit on the Pull request with hash and message, checked against the Git bundle.
activityarrayThe Pull request activity in order: update, approval, comment and changes-requested entries on Cloud; actions such as OPENED, RESCOPED, REVIEWED and MERGED on Data Center.
commentsarrayEach Comment with raw text, parent and inline anchor: path with from and to lines in the old and new file on Cloud; path, line, line type and file type on Data Center.
tasksarrayEach Task with text and state: its own object from the tasks endpoint on Cloud, a comment with BLOCKER severity on recent Data Center releases.
participantsarrayReviewers with role and Approval status: approved or changes requested on Cloud; APPROVED, NEEDS_WORK or UNAPPROVED on Data Center.
buildsarrayEach Pipeline with build number, commit, result and Steps with log text on Cloud; on Data Center, build statuses posted by an external CI server.
Sample recordIllustrative

Field names from the table above; values are masked placeholders.

Example record

{
  "source_product": "Bitbucket Cloud",
  "repository": {
    "workspace": "ws_7c1e",
    "project_key": "PAY",
    "repo_slug": "billing-service"
  },
  "pull_request_id": 1184,
  "title": "PAY-482 Retry failed webhook deliveries with backoff",
  "state": "MERGED",
  "refs": {
    "source_branch": "feature/PAY-482-retry-webhooks",
    "source_commit": "4be7a1c09d2f",
    "destination_branch": "main",
    "merge_commit": "e2f8b6d4517a"
  },
  "jira_issue_keys": [
    {
      "key": "PAY-482",
      "found_in": [
        "branch",
        "title"
      ],
      "resolved": true
    }
  ],
  "commits": [
    {
      "hash": "c03a9e17b5d2",
      "message": "PAY-482 add retry queue"
    },
    {
      "hash": "4be7a1c09d2f",
      "message": "PAY-482 cap attempts"
    }
  ],
  "activity": [
    {
      "t": "2024-05-13T09:02:11Z",
      "entry": "update",
      "source_commit": "c03a9e17b5d2"
    },
    {
      "t": "2024-05-13T11:41:20Z",
      "entry": "changes_requested",
      "user": "user_0417"
    },
    {
      "t": "2024-05-14T08:15:03Z",
      "entry": "update",
      "source_commit": "4be7a1c09d2f"
    },
    {
      "t": "2024-05-14T09:27:44Z",
      "entry": "approval",
      "user": "user_0417"
    },
    {
      "t": "2024-05-14T09:31:09Z",
      "entry": "update",
      "state": "MERGED"
    }
  ],
  "comments": [
    {
      "comment_id": 5501,
      "user": "user_0417",
      "inline": {
        "path": "src/webhooks/retry.py",
        "from": null,
        "to": 42
      },
      "raw": "Retries forever if the endpoint keeps returning 500. Cap the attempts."
    }
  ],
  "tasks": [
    {
      "comment_id": 5501,
      "content": "Cap attempts",
      "state": "RESOLVED"
    }
  ],
  "participants": [
    {
      "user": "user_0417",
      "role": "REVIEWER",
      "approved": true
    }
  ],
  "builds": [
    {
      "build_number": 3907,
      "commit": "4be7a1c09d2f",
      "result": "SUCCESSFUL",
      "steps": [
        {
          "name": "Unit tests",
          "result": "SUCCESSFUL"
        }
      ]
    }
  ]
}

Synthetic record for illustration. Field names, structure and format are agreed per order.

What AI teams use it for

Code review models

Inline comments anchored to a file and line, with the commit that answered each, are worked examples of review on commercial code.

Coding agent tasks

A merged pull request with a resolved Jira issue gives a problem statement, a base commit, a reference change and a build result.

Build failure repair

Failed Pipelines steps with log text, followed by the commit that turned the build green, teach a model to read a build log and fix the cause.

Merge readiness judgment

Tasks, changes requested, withdrawn approvals and declined pull requests show when a team judged a change not ready.

Evaluation sets

Pull requests from repositories that were never public make test items scored against the merged change and its build.

Use-case guides: Coding agents, Private evaluation sets, Enterprise and computer-use agents

What makes this data valuable

Issue keys resolve

Most merged pull requests carry a key that matches an issue in a delivered Jira project.

Full activity streams

Each pull request has its opening, review and merge entries.

Anchors intact

Inline comments keep a path and line that exist in the delivered diff.

Commits reachable

Every hash a pull request names is in the Git bundle, squash merges included.

Builds tied to commits

Pipelines runs or build statuses join to the commit they tested.

Product stated

The delivery says Cloud or Data Center for each repository.

Document stack

Bitbucket dataset

This page covers bitbucket repositories and pull requests.Illustrative

The reason for a change sits in Jira, behind an issue key

Bitbucket records what changed and who looked at it. A Pull request joins a source branch to a destination branch and collects commits, comments, tasks, approvals and a merge. It rarely records why. In most businesses that run Bitbucket the work item is a Jira issue, and the pull request's description is often blank or a filled-in template. What joins the two systems is text: an issue key, which is a Jira project key, a hyphen and a number, typed into a branch name, a commit message or a pull request title. Jira's create-branch action writes the key into the branch name, and the development panel on a Jira issue is filled by matching those same strings.

So the link has to be rebuilt by parsing, and the parse fails in known ways. A pull request can carry several keys or none. A key can be mistyped, can belong to a Jira site outside the delivery, or can point to an issue later moved to another project and given a new key. Commit messages can also hold Smart Commit commands, a hash sign followed by comment, time or a workflow transition, which are instructions to Jira and not a description of the change. Without the Jira project, a key is an opaque label.

Bitbucket also overwrites. A pull request's title and description hold their current text, and earlier states survive only in its activity: update entries on Cloud, UPDATED and RESCOPED entries on Data Center, where a rescope lists the commits each push to the source branch added and removed, a force push included. A declined pull request and, on Data Center, a withdrawn approval are in that stream and nowhere in Git.

Bitbucket Cloud and Bitbucket Data Center are two products

The two share a name and little of an API. Cloud nests a Repository in a Project in a Workspace. A pull request there is OPEN, MERGED, DECLINED or SUPERSEDED, its activity endpoint returns comments, updates, approvals and requests for changes, tasks come from a separate endpoint, timestamps are ISO strings and people are account IDs. Data Center, the self-managed product that replaced Bitbucket Server, addresses a repository by project key and slug through a different REST API. Its activities carry an action such as OPENED, COMMENTED, RESCOPED, APPROVED, UNAPPROVED, REVIEWED, MERGED or DECLINED, timestamps are epoch milliseconds and users have names, slugs and email addresses.

The differences reach what a model learns from. A Cloud inline comment is anchored by a path with a from line in the old version of the file and a to line in the new one. A Data Center anchor has a path, a line, a line type of added, removed or context, and a file type naming the side of the diff. Bitbucket Pipelines exists only in Cloud. Data Center shows build statuses that Bamboo, Jenkins or another CI server posted against a commit, and the logs stay on that server.

A mirror clone returns commits, branches and tags, and none of this. Pull requests, comments, approvals and tasks live in Bitbucket's database and come out one pull request at a time through that product's own endpoints. A clone also follows only branches and tags. After a squash merge with the source branch deleted, the commits the reviewer read sit on neither and may be missing, so ask how they were retrieved. To test a sample, take twenty merged pull requests, replay each activity stream from opening to merge, and confirm that every commit hash it names resolves in the delivered repository and every inline anchor lands on a line of the diff.

What to check before licensing

  • Have the data owner and your counsel check Atlassian's terms on exported data and API use for the product in question, Bitbucket Cloud or Bitbucket Data Center.
  • Confirm who owns the code. Ask about contractor-written code, client-owned repositories, forks and vendored or open-source libraries.
  • Ask how the whole Git history, not only the current tree, was scanned for committed secrets, and whether removing them or pseudonymizing authors rewrote commit hashes. If so, ask for the old-to-new hash map.
  • Ask whether the linked Jira project is in the delivery, and measure the share of merged pull requests whose issue key resolves to a delivered issue.
  • Ask which product and release each repository came from, whether history was migrated from Data Center to Cloud, and what the migration kept.
  • Replay a sample of merged pull requests from opening to merge to check that activity was read in full through that product's own endpoint, and ask how the commits of squash-merged pull requests were retrieved.
  • Ask how builds are covered: Pipelines runs with step logs and for which period, or build statuses from an external CI server whose logs are sourced separately.

Delivery No files move before a signed license. A listing or a request grants no files by itself.

How licensing works through SourceX

  1. 1

    Define

    Send the domain, modality, volume, format, timeline and permitted use you need.

  2. 2

    Source

    SourceX identifies businesses that hold matching data and are open to licensing it.

  3. 3

    Qualify

    Fit, rights and quality are checked, and you review samples before committing.

  4. 4

    License

    Scope, permitted use, exclusivity, price and obligations are agreed in writing.

  5. 5

    Deliver

    Approved data is prepared, de-identified where required and transferred securely.

Questions Acquisition Partners ask

What does a Bitbucket dataset contain?

It contains the Git repositories and the review record around them: commits, branches and tags from Git, and from Bitbucket the pull requests with their activity, inline comments, tasks, approvals and merges, plus Pipelines runs where the company used them. You specify languages, repository count and years of history, and supply is not guaranteed.

Does it matter whether the data came from Bitbucket Cloud or Data Center?

Yes, because they are different products with different APIs and object names. Cloud has workspaces, a changes_requested participant state and account IDs. Data Center has project keys, RESCOPED and REVIEWED actions, a NEEDS_WORK status and epoch timestamps. Pipelines exists only in Cloud. A delivery should state the product for each repository.

Why do the pull requests need the Jira project?

Because most teams that run Bitbucket write the reason for a change in Jira. The pull request points to it only through an issue key in the branch name, commit messages or title. With the Jira project delivered, the key joins to the issue's type, description and status history. Without it, the pull request shows what changed and not why.

Are build logs included?

Only from Bitbucket Cloud, and only where Pipelines logs were retained. There, Pipelines runs have steps with log text, and the pipeline definition is the bitbucket-pipelines.yml file in the repository. On Data Center, Bitbucket holds only the build statuses an external CI server posted against each commit, and the logs sit on that server.

How are secrets and personal details in the code handled?

They are screened before delivery, and you should test the sample yourself. Keys and passwords can sit in old commits long after the current files were cleaned, and build logs can print variables. Author names and emails are part of every commit. Removing either from Git history changes commit hashes, so ask how links from pull requests to commits were kept.

Is SourceX affiliated with Atlassian?

Bitbucket is named to identify the system the records come from. That does not imply a partnership with or endorsement by Atlassian. The records belong to the business that runs Bitbucket, which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.

Evaluating this data for procurement?

Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.

Request dataset diligence

Tell us what your models need

Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.

Updated 26 November 2026. Own data like this? See how companies license it to AI developers.

See if your company qualifies