Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Status
colourGreen
titleversion 2.11.0+
The repository id and repository name field in the response result was implemented.

Note

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

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:

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

Code Block
languagejson
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",
    }
  ]
}

...