Esta versión de GitHub Enterprise se discontinuó el 2022-06-03. No se realizarán lanzamientos de patch, ni siquiera para problemas de seguridad críticos. Para obtener un mejor desempeño, más seguridad y nuevas características, actualiza a la última versión de GitHub Enterprise. Para obtener ayuda con la actualización, contacta al soporte de GitHub Enterprise.
Comentarios sobre revisiones de solicitudes de extracción
About the Pull request review comments API
Los comentarios de revisión de las solicitudes de extracción son comentarios de una porción de la diff unificada durante la revisión de esta solicitud. Los comentarios de confirmación y comentarios de la solicitud de extracción son diferentes de aquellos sobre la revisión de estas solicitudes. Se aplican comentarios de confirmación directamente a un confirmación, así como se aplican comentarios del informe de problemas sin referenciar una porción de la diff unificada. Para obtener más información, consulta las secciones "Crear un comentario sobre una confirmación" y "Crear un comentario sobre un informe de problemas".
Tipos de medios personalizados para los comentarios sobre las revisiones de las solicitudes de extracción
Estos son los tipos de medios compatibles para los comentarios sobre las revisiones de las solicitudes de exstracción.
application/vnd.github.VERSION.raw+json
application/vnd.github.VERSION.text+json
application/vnd.github.VERSION.html+json
application/vnd.github.VERSION.full+json
Para obtener más información, consulta la sección "Tipos de medios personalizados".
List review comments in a repository
Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.
Parámetros
| Encabezados | 
|---|
| Nombre, Tipo, Descripción | 
| acceptstringSetting to  | 
| Parámetros de ruta | 
| Nombre, Tipo, Descripción | 
| ownerstringRequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostringRequeridoThe name of the repository. The name is not case sensitive. | 
| Parámetros de consulta | 
| Nombre, Tipo, Descripción | 
| sortstringPuede ser una de las siguientes:  | 
| directionstringCan be either  Puede ser una de las siguientes:  | 
| sincestringOnly show notifications updated after the given time. This is a timestamp in ISO 8601 format:  | 
| per_pageintegerThe number of results per page (max 100). Predeterminado:  | 
| pageintegerPage number of the results to fetch. Predeterminado:  | 
Códigos de estado de respuesta HTTP
| Código de estado | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código
curl \
  -H "Accept: application/vnd.github.v3+json" \ 
  -H "Authorization: token <TOKEN>" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/commentsResponse
Status: 200[
  {
    "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
    "pull_request_review_id": 42,
    "id": 10,
    "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw",
    "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
    "path": "file1.txt",
    "position": 1,
    "original_position": 4,
    "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
    "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
    "in_reply_to_id": 8,
    "user": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "body": "Great stuff!",
    "created_at": "2011-04-14T16:00:49Z",
    "updated_at": "2011-04-14T16:00:49Z",
    "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
    "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1",
    "author_association": "NONE",
    "_links": {
      "self": {
        "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1"
      },
      "html": {
        "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
      },
      "pull_request": {
        "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1"
      }
    },
    "start_line": 1,
    "original_start_line": 1,
    "start_side": "RIGHT",
    "line": 2,
    "original_line": 2,
    "side": "RIGHT"
  }
]Avisos de previsualización
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Multi-line comments in a pull request diff is currently available for developers to preview. During the preview period, these response fields may change without advance notice. See the blog post for more information.
To create multi-line comments or see multi-line comments with the new supported fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonTo show multi-line comment-supported fields in the response, use the comfort-fade preview header and the line parameter.
If you use the comfort-fade preview header, your response will show:
- For multi-line comments, values for start_line,original_start_line,start_side,line,original_line, andside.
- For single-line comments, values for line,original_line, andsideand anullvalue forstart_line,original_start_line, andstart_side.
If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
- For multi-line comments, the last line of the comment range for the positionattribute.
- For single-line comments, the diff-positioned way of referencing comments for the positionattribute.
Get a review comment for a pull request
Provides details for a review comment.
Parámetros
| Encabezados | 
|---|
| Nombre, Tipo, Descripción | 
| acceptstringSetting to  | 
| Parámetros de ruta | 
| Nombre, Tipo, Descripción | 
| ownerstringRequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostringRequeridoThe name of the repository. The name is not case sensitive. | 
| comment_idintegerRequeridoThe unique identifier of the comment. | 
Códigos de estado de respuesta HTTP
| Código de estado | Descripción | 
|---|---|
| 200 | OK | 
| 404 | Resource not found | 
Ejemplos de código
curl \
  -H "Accept: application/vnd.github.v3+json" \ 
  -H "Authorization: token <TOKEN>" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/comments/COMMENT_IDResponse
Status: 200{
  "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
  "pull_request_review_id": 42,
  "id": 10,
  "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw",
  "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
  "path": "file1.txt",
  "position": 1,
  "original_position": 4,
  "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
  "in_reply_to_id": 8,
  "user": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "body": "Great stuff!",
  "created_at": "2011-04-14T16:00:49Z",
  "updated_at": "2011-04-14T16:00:49Z",
  "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
  "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1",
  "author_association": "NONE",
  "_links": {
    "self": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1"
    },
    "html": {
      "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
    },
    "pull_request": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1"
    }
  },
  "start_line": 1,
  "original_start_line": 1,
  "start_side": "RIGHT",
  "line": 2,
  "original_line": 2,
  "side": "RIGHT"
}Avisos de previsualización
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Multi-line comments in a pull request diff is currently available for developers to preview. During the preview period, these response fields may change without advance notice. See the blog post for more information.
To create multi-line comments or see multi-line comments with the new supported fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonTo show multi-line comment-supported fields in the response, use the comfort-fade preview header and the line parameter.
If you use the comfort-fade preview header, your response will show:
- For multi-line comments, values for start_line,original_start_line,start_side,line,original_line, andside.
- For single-line comments, values for line,original_line, andsideand anullvalue forstart_line,original_start_line, andstart_side.
If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
- For multi-line comments, the last line of the comment range for the positionattribute.
- For single-line comments, the diff-positioned way of referencing comments for the positionattribute.
Update a review comment for a pull request
Enables you to edit a review comment.
Parámetros
| Encabezados | 
|---|
| Nombre, Tipo, Descripción | 
| acceptstringSetting to  | 
| Parámetros de ruta | 
| Nombre, Tipo, Descripción | 
| ownerstringRequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostringRequeridoThe name of the repository. The name is not case sensitive. | 
| comment_idintegerRequeridoThe unique identifier of the comment. | 
| Parámetros de cuerpo | 
| Nombre, Tipo, Descripción | 
| bodystringRequeridoThe text of the reply to the review comment. | 
Códigos de estado de respuesta HTTP
| Código de estado | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código
curl \
  -X PATCH \
  -H "Accept: application/vnd.github.v3+json" \ 
  -H "Authorization: token <TOKEN>" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/comments/COMMENT_ID \
  -d '{"body":"I like this too!"}'Response
Status: 200{
  "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
  "pull_request_review_id": 42,
  "id": 10,
  "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw",
  "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
  "path": "file1.txt",
  "position": 1,
  "original_position": 4,
  "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
  "in_reply_to_id": 8,
  "user": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "body": "Great stuff!",
  "created_at": "2011-04-14T16:00:49Z",
  "updated_at": "2011-04-14T16:00:49Z",
  "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
  "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1",
  "author_association": "NONE",
  "_links": {
    "self": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1"
    },
    "html": {
      "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
    },
    "pull_request": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1"
    }
  },
  "start_line": 1,
  "original_start_line": 1,
  "start_side": "RIGHT",
  "line": 2,
  "original_line": 2,
  "side": "RIGHT"
}Aviso de previsualización
Multi-line comments in a pull request diff is currently available for developers to preview. During the preview period, these response fields may change without advance notice. See the blog post for more information.
To create multi-line comments or see multi-line comments with the new supported fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonTo show multi-line comment-supported fields in the response, use the comfort-fade preview header and the line parameter.
If you use the comfort-fade preview header, your response will show:
- For multi-line comments, values for start_line,original_start_line,start_side,line,original_line, andside.
- For single-line comments, values for line,original_line, andsideand anullvalue forstart_line,original_start_line, andstart_side.
If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
- For multi-line comments, the last line of the comment range for the positionattribute.
- For single-line comments, the diff-positioned way of referencing comments for the positionattribute.
Delete a review comment for a pull request
Deletes a review comment.
Parámetros
| Encabezados | 
|---|
| Nombre, Tipo, Descripción | 
| acceptstringSetting to  | 
| Parámetros de ruta | 
| Nombre, Tipo, Descripción | 
| ownerstringRequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostringRequeridoThe name of the repository. The name is not case sensitive. | 
| comment_idintegerRequeridoThe unique identifier of the comment. | 
Códigos de estado de respuesta HTTP
| Código de estado | Descripción | 
|---|---|
| 204 | No Content | 
| 404 | Resource not found | 
Ejemplos de código
curl \
  -X DELETE \
  -H "Accept: application/vnd.github.v3+json" \ 
  -H "Authorization: token <TOKEN>" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/comments/COMMENT_IDResponse
Status: 204List review comments on a pull request
Lists all review comments for a pull request. By default, review comments are in ascending order by ID.
Parámetros
| Encabezados | 
|---|
| Nombre, Tipo, Descripción | 
| acceptstringSetting to  | 
| Parámetros de ruta | 
| Nombre, Tipo, Descripción | 
| ownerstringRequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostringRequeridoThe name of the repository. The name is not case sensitive. | 
| pull_numberintegerRequeridoThe number that identifies the pull request. | 
| Parámetros de consulta | 
| Nombre, Tipo, Descripción | 
| sortstringThe property to sort the results by.  Predeterminado:  Puede ser una de las siguientes:  | 
| directionstringCan be either  Puede ser una de las siguientes:  | 
| sincestringOnly show notifications updated after the given time. This is a timestamp in ISO 8601 format:  | 
| per_pageintegerThe number of results per page (max 100). Predeterminado:  | 
| pageintegerPage number of the results to fetch. Predeterminado:  | 
Códigos de estado de respuesta HTTP
| Código de estado | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código
curl \
  -H "Accept: application/vnd.github.v3+json" \ 
  -H "Authorization: token <TOKEN>" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/commentsResponse
Status: 200[
  {
    "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
    "pull_request_review_id": 42,
    "id": 10,
    "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw",
    "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
    "path": "file1.txt",
    "position": 1,
    "original_position": 4,
    "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
    "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
    "in_reply_to_id": 8,
    "user": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "body": "Great stuff!",
    "created_at": "2011-04-14T16:00:49Z",
    "updated_at": "2011-04-14T16:00:49Z",
    "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
    "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1",
    "author_association": "NONE",
    "_links": {
      "self": {
        "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1"
      },
      "html": {
        "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
      },
      "pull_request": {
        "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1"
      }
    },
    "start_line": 1,
    "original_start_line": 1,
    "start_side": "RIGHT",
    "line": 2,
    "original_line": 2,
    "side": "RIGHT"
  }
]Avisos de previsualización
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Multi-line comments in a pull request diff is currently available for developers to preview. During the preview period, these response fields may change without advance notice. See the blog post for more information.
To create multi-line comments or see multi-line comments with the new supported fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonTo show multi-line comment-supported fields in the response, use the comfort-fade preview header and the line parameter.
If you use the comfort-fade preview header, your response will show:
- For multi-line comments, values for start_line,original_start_line,start_side,line,original_line, andside.
- For single-line comments, values for line,original_line, andsideand anullvalue forstart_line,original_start_line, andstart_side.
If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
- For multi-line comments, the last line of the comment range for the positionattribute.
- For single-line comments, the diff-positioned way of referencing comments for the positionattribute.
Create a review comment for a pull request
Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "Create an issue comment." We recommend creating a review comment using line, side, and optionally start_line and start_side if your comment applies to more than one line in the pull request diff.
You can still create a review comment using the position parameter. When you use position, the line, side, start_line, and start_side parameters are not required. For more information, see the comfort-fade preview notice.
Note: The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.
Parámetros
| Encabezados | 
|---|
| Nombre, Tipo, Descripción | 
| acceptstringSetting to  | 
| Parámetros de ruta | 
| Nombre, Tipo, Descripción | 
| ownerstringRequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostringRequeridoThe name of the repository. The name is not case sensitive. | 
| pull_numberintegerRequeridoThe number that identifies the pull request. | 
| Parámetros de cuerpo | 
| Nombre, Tipo, Descripción | 
| bodystringRequeridoThe text of the review comment. | 
| commit_idstringThe SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the  | 
| pathstringThe relative path to the file that necessitates a comment. | 
| positionintegerRequired without  | 
| sidestringRequired with  Puede ser una de las siguientes:  | 
| lineintegerRequired with  | 
| start_lineintegerRequired when using multi-line comments. To create multi-line comments, you must use the  | 
| start_sidestringRequired when using multi-line comments. To create multi-line comments, you must use the  Puede ser una de las siguientes:  | 
| in_reply_tointegerThe ID of the review comment to reply to. To find the ID of a review comment with "List review comments on a pull request". When specified, all parameters other than  | 
Códigos de estado de respuesta HTTP
| Código de estado | Descripción | 
|---|---|
| 201 | Created | 
| 403 | Forbidden | 
| 422 | Validation failed | 
Ejemplos de código
curl \
  -X POST \
  -H "Accept: application/vnd.github.v3+json" \ 
  -H "Authorization: token <TOKEN>" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/comments \
  -d '{"body":"Great stuff!","commit_id":"6dcb09b5b57875f334f61aebed695e2e4193db5e","path":"file1.txt","start_line":1,"start_side":"RIGHT","line":2,"side":"RIGHT"}'Response
Status: 201{
  "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
  "pull_request_review_id": 42,
  "id": 10,
  "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw",
  "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
  "path": "file1.txt",
  "position": 1,
  "original_position": 4,
  "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
  "in_reply_to_id": 8,
  "user": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "body": "Great stuff!",
  "created_at": "2011-04-14T16:00:49Z",
  "updated_at": "2011-04-14T16:00:49Z",
  "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
  "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1",
  "author_association": "NONE",
  "_links": {
    "self": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1"
    },
    "html": {
      "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
    },
    "pull_request": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1"
    }
  },
  "start_line": 1,
  "original_start_line": 1,
  "start_side": "RIGHT",
  "line": 2,
  "original_line": 2,
  "side": "RIGHT"
}Aviso de previsualización
Multi-line comments in a pull request diff is currently available for developers to preview. During the preview period, these response fields may change without advance notice. See the blog post for more information.
To create multi-line comments or see multi-line comments with the new supported fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonTo show multi-line comment-supported fields in the response, use the comfort-fade preview header and the line parameter.
If you use the comfort-fade preview header, your response will show:
- For multi-line comments, values for start_line,original_start_line,start_side,line,original_line, andside.
- For single-line comments, values for line,original_line, andsideand anullvalue forstart_line,original_start_line, andstart_side.
If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
- For multi-line comments, the last line of the comment range for the positionattribute.
- For single-line comments, the diff-positioned way of referencing comments for the positionattribute.
Create a reply for a review comment
Creates a reply to a review comment for a pull request. For the comment_id, provide the ID of the review comment you are replying to. This must be the ID of a top-level review comment, not a reply to that comment. Replies to replies are not supported.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.
Parámetros
| Encabezados | 
|---|
| Nombre, Tipo, Descripción | 
| acceptstringSetting to  | 
| Parámetros de ruta | 
| Nombre, Tipo, Descripción | 
| ownerstringRequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostringRequeridoThe name of the repository. The name is not case sensitive. | 
| pull_numberintegerRequeridoThe number that identifies the pull request. | 
| comment_idintegerRequeridoThe unique identifier of the comment. | 
| Parámetros de cuerpo | 
| Nombre, Tipo, Descripción | 
| bodystringRequeridoThe text of the review comment. | 
Códigos de estado de respuesta HTTP
| Código de estado | Descripción | 
|---|---|
| 201 | Created | 
| 404 | Resource not found | 
Ejemplos de código
curl \
  -X POST \
  -H "Accept: application/vnd.github.v3+json" \ 
  -H "Authorization: token <TOKEN>" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/comments/COMMENT_ID/replies \
  -d '{"body":"Great stuff!"}'Response
Status: 201{
  "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
  "pull_request_review_id": 42,
  "id": 10,
  "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw",
  "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
  "path": "file1.txt",
  "position": 1,
  "original_position": 4,
  "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
  "in_reply_to_id": 426899381,
  "user": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "body": "Great stuff!",
  "created_at": "2011-04-14T16:00:49Z",
  "updated_at": "2011-04-14T16:00:49Z",
  "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
  "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1",
  "author_association": "NONE",
  "_links": {
    "self": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1"
    },
    "html": {
      "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
    },
    "pull_request": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1"
    }
  },
  "start_line": 1,
  "original_start_line": 1,
  "start_side": "RIGHT",
  "line": 2,
  "original_line": 2,
  "side": "RIGHT"
}