Alternate REST API to get the JIRA commit details

Issue #104 new
Former user created an issue

Hi Davies,

Thanks for the handy Commit Graph plugin. It is very useful plugin both the ones to be installed in Bitbucket and JIRA. This helps from end-user point of view.

Can you please let me know if there is a REST API that can get similar details? We need this for automating build report activities.

We have currently built CLI tool using Python to get similar details using below two REST API-

  1. Bitbucket Server API - /rest/jira/1.0/issues/{issueKey}/commits

  2. Bitbucket Server API - /rest/branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branches/info/{commitId}

The logic would be get all commits for given JIRA Issue key and pass it to the 2nd API to get the detailed commit information in the branch.

But we notice that once the commit is merged to the default branch (example - develop/master) of the repository, the 2nd API does not list the other branches to which this commit would also have been merged. This is quite annoying.

Example -

  1. Commit done in feature branch

  2. Feature branch merged to default branch (say - develop)

  3. develop branch merged to release branch

In this case, the 2nd API does not list the release branch in which this commit also exists. Your plugin provides these details i.e. shows both develop and release branch but the Bitbucket Server REST API "rest/branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branches/info/{commitId}" does not show release branch in the API results.

Now if I were to change the default branch from develop to some other branch say master, then the API lists both develop and release branches in the result.

Any pointers to use alternate APIs to get required information for Bitbucket Server?

Regards, Richard

Comments (4)

  1. Puddleglum

    We are also interested in knowing the REST API of Control Freak so we can automate settings via Groovy script. Is there any REST API documentation for this plugin? I first looked as to where other plugins are located but couldn’t find anything.

  2. Julius Davies [bit-booster.com] repo owner

    Puddleglum, shoot me an email at sylvie@bit-booster.com and I can help you put together a script to set Control-Freak settings using old fashioned POST with application/x-www-form-urlencoded data !

  3. Log in to comment