Include Branch and issue keys Information in Commit REST API Response

XMLWordPrintable

      Summary

      Currently, the Bitbucket Cloud REST API provides endpoints to retrieve commit details (e.g., /2.0/repositories/{workspace}/{repo_slug}/commit/{commit_sha}{}), but the response does not include information about which branches the commit is part of and the parent branch. In the Bitbucket UI, this information is visible when viewing a commit, but it is not available via the API. The Jira issue keys also not available. 

      Use Case

      For automation, integrations, and CI/CD workflows, it is important to programmatically determine which branches contain a specific commit and Jira issue keys. This is especially useful for tracking deployments, release management, and branch maintenance.

      Current Workaround

      The only workaround is to:

      1. Retrieve the list of all branches using the The Bitbucket Cloud REST API.
      1. For each branch, use the The Bitbucket Cloud REST API to check if the commit is present in that branch.
      1. Use REGEX to get the pattern for the issue keys from the commit message. 

              Assignee:
              Unassigned
              Reporter:
              Karthick S
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: