Contents

Add Pull Request Comment

Adds comments on pull requests.

Role

Administrator
Normal User

Method

POST

URL

/api/v2/projects/:projectIdOrKey/git/repositories/:repoIdOrName/pullRequests/:number/comments

URL parameters

Parameter NameTypeDescription
projectIdOrKeyStringProject ID or Project Key
repoIdOrNameStringRepository ID or Repository name
numberNumberPull request number

Form parameters

Content-Type:application/x-www-form-urlencoded
Parameter NameTypeDescription
content (required)StringComment
attachmentId[]
(Multiple)
NumberAttachment file ID(Post Attachment File returns)
notifiedUserId[]
(複数指定可)
NumberUser ID to send notification when comment is added

Response example

Status Line / Response Header

HTTP/1.1 200 OK
Content-Type:application/json;charset=utf-8

Response Body

{
    "id": 35,
    "content": "from api",
    "changeLog": [
        {
            "field": "dependentIssue",
            "newValue": "GIT-3",
            "originalValue": null
        }
    ],
    "createdUser": {
        "id": 1,
        "userId": "admin",
        "name": "admin",
        "roleType": 1,
        "lang": "ja",
        "nulabAccount": {
            "nulabId": "Prm9ZD9DQD5snNWcSYSwZiQoA9WFBUEa2ySznrSnSQRhdC2X8G",
            "name": "admin",
            "uniqueId": "admin"
        },
        "mailAddress": "eguchi@nulab.example",
        "lastLoginTime": "2022-09-01T06:35:39Z"
    },
    "created":"2015-05-14T01:53:38Z",
    "updated":"2015-05-14T01:53:38Z",
    "stars":[],
    "notifications":[]
}