Contents

プルリクエストコメントの追加

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

プルリクエストにコメントを追加します。

実行可能な権限

管理者
一般ユーザー

URL パラメーター

パラメーター名内容
projectIdOrKeystringプロジェクトのID または プロジェクトキー
repoIdOrNamestringリポジトリのID または リポジトリ名
numberintプルリクエストの番号

リクエストパラメーター

Content-Type:application/x-www-form-urlencoded
パラメーター名内容
content (必須)stringコメントの本文
attachmentId[]
(複数指定可)
int添付ファイルの送信APIが返すID
notifiedUserId[]
(複数指定可)
intコメント登録の通知を受け取るユーザーID

レスポンス例

ステータスライン / レスポンスヘッダ

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

レスポンスボディ

{
    "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":[]
}

エラーレスポンス

エラーレスポンスを参照してください。

制限事項

レート制限を参照してください