获取某个Pull Request的所有评论
GET/api/v5/repos/:owner/:repo/pulls/:number/comments
Request
Path Parameters
owner stringrequired
仓库所属空间地址(组织或个人的地址path)
repo stringrequired
仓库路径(path)
number integerrequired
第几个PR,即本仓库PR的序数
Example: 0
Query Parameters
access_token string
用户授权码
page integer
当前的页码:默认为 1
per_page integer
每页的数量,最大为 100,默认 20
direction string
可选。升序/降序(asc/desc)
comment_type string
可选。筛选评论 类型。代码行评论/pr普通评论:diff_comment/pr_comment
Responses
- 200
成功响应
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
- Array [
- Array [
- ]
- ]
idintegerrequired
discussion_idstringrequired
讨论id
bodystringrequired
created_atstringrequired
updated_atstringrequired
user objectrequired
idstringrequired
loginstringrequired
namestringrequired
avatar_urlstringrequired
html_urlstringrequired
comment_typestringrequired
resolvedbooleanrequired
diff_filestringrequired
diff_position objectrequired
start_new_lineinteger
end_new_lineinteger
start_old_lineinteger
end_old_lineinteger
position_typestring
"binary":文件级评论,"text":代码行评论。
reply object[]
idinteger
bodystring
created_atstring
updated_atstring
user object
idstring
loginstring
namestring
avatar_urlstring
html_urlstring
[
{
"id": 0,
"discussion_id": "string",
"body": "string",
"created_at": "string",
"updated_at": "string",
"user": {
"id": "string",
"login": "string",
"name": "string",
"avatar_url": "string",
"html_url": "string"
},
"comment_type": "string",
"resolved": true,
"diff_file": "string",
"diff_position": {
"start_new_line": 0,
"end_new_line": 0,
"start_old_line": 0,
"end_old_line": 0,
"position_type": "string"
},
"reply": [
{
"id": 0,
"body": "string",
"created_at": "string",
"updated_at": "string",
"user": {
"id": "string",
"login": "string",
"name": "string",
"avatar_url": "string",
"html_url": "string"
}
}
]
}
]
{
"id": "de772738e6dab92174c0e86c052ccf9bed24f747",
"body": "111",
"created_at": "2024-04-19T07:48:59.755+00:00",
"updated_at": "2024-04-19T07:48:59.755+00:00",
"user": {
"id": 708,
"login": "Lzm_0916",
"name": "Lzm_0916",
"avatar_url": "https://gitcode-img.obs.cn-south-1.myhuaweicloud.com:443/cb/da/6cb18d9ae9f1a94b4f640d3b848351c352c7869f33d0cb68e7acad4f224c4e23.png",
"html_url": "https://test.gitcode.net/Lzm_0916"
}
}