Get Commits

Call the Get Commits REST API to obtain commit information associated with an issue.

version 2.11.0+ The repository id and repository name field in the response result was implemented.

To perform the Get Commits API call, the Jira user must have the permission to read the requested issue.

Get Commits

Get Commits

url

/rest/gitplugin/1.0/issues/{issueKey}/commits

method

GET

parameters

Parameter

Condition

issueKey

String. Required.

This is the Jira Issue Key – a concatenation of Project key and Issue number. It must contain a dash ('-'). The issueKey must be valid and existent.

For example: TST-234.

response

Returns the result in the example below.

Example:

Example:

http://jira.yourorg.com/rest/gitplugin/1.0/issues/TST-234/commits

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Returns the following example result: { "commits":[ { "author": "msmith <mark@bigbrassband.com>", "commitId": "34efa20372f0e2f0c9b705aacc57d7ad82e01426", "date": "2015-05-18T10:52:54.000+0000", "message": "TST-234 Update link in documentation", "repository": { // INTRODUCED V2.11.0 "id": 5, "name": "test repository name" }, "branch": "master", "notes": { "refs/notes/commits": "TST-1 fixed also" }, }, { "author": "msmith <mark@bigbrassband.com>", "commitId": "52696c2d963be8986c7a2444b6473ea785632dce", "date": "2015-05-18T17:41:58.000+0000", "message": "TST-234 Remove libtiff dependency", } ] }