- 附件
- 许可证
- 忽略文件
- 用户
- 组织
- 项目
- 关注一个项目
- 取消关注一个项目
- 点赞一个项目
- 取消点赞一个项目
- 项目邀请链接生成
- 获取邀请链接信息
- 通过链接接受邀请
- 加入项目
- 退出项目
- 项目列表
- 推荐项目列表
- fork项目
- 创建项目
- 创建镜像项目
- 同步镜像
- 更新项目(基础信息)
- 更新项目
- 删除项目
- 项目主页
- 项目导航列表
- 获取所有的项目搜索标签
- 为项目创建一个搜索标签
- 删除项目一个搜索标签
- 项目详情
- 项目详情(简版)
- 项目设置-项目详情
- 项目设置-项目导航
- 项目设置-更改项目导航
- 获取项目贡献者代码行数
- 转移项目-管理的组织列表
- 转移项目
- 取消转移项目
- 获取项目贡献者列表(代码行)
- 获取项目贡献者列表
- 获取项目开发语言
- 获取项目分支列表
- 获取项目分支列表(无分页)
- 创建一个项目分支
- 删除一个项目分支
- 更新项目默认分支
- 恢复一个项目分支
- 获取项目标签列表
- 获取所有标签列表(无分页)
- 获取一个项目标签
- 删除一个项目标签
- 添加一个项目成员
- 删除一个项目成员
- 更改项目成员权限
- 项目成员列表
- 获取项目所有文件
- 提交文件到项目
- 获取项目代码目录
- 获取项目代码子目录或者文件
- 获取项目README文件
- 获取文件树列表
- 获取项目blobs内容
- 获取项目提交列表
- 获取单个提交的变更文件列表
- 获取单个提交的diff信息
- 获取单个文件的blame信息
- 获取比较提交的diff信息
- 创建一个文件
- 删除一个文件
- 更新一个文件
- 替换一个文件
- 获取项目关注列表
- 获取项目点赞列表
- 疑修
- 合并请求
- 获取合并请求列表GET
- 获取一个合并请求GET
- 重新打开一个合并请求POST
- 创建一个合并请求POST
- 更新一个合并请求PUT
- 拒绝一个合并请求POST
- 通过一个合并请求POST
- 获取一个合并请求变更文件列表GET
- 获取一个合并请求变更文件列表(简版)GET
- 获取一个合并请求提交列表GET
- 获取两个分支、标签、提交标识之间的比较内容GET
- 获取两个分支、标签、提交标识之间的变更文件列表GET
- 获取合并请求版本列表GET
- 获取合并请求版本之间的DiffGET
- 获取合并请求审查列表GET
- 创建一个合并请求审查POST
- 获取合并请求审查评论列表GET
- 创建一个合并请求审查评论POST
- 修改一个合并请求审查评论PUT
- 删除一个合并请求审查评论DELETE
- 创建一个合并请求评论POST
- 删除一个合并请求评论DELETE
- 获取一个合并请求评论列表GET
- 发行版
- 数据集
- WebHook
- Oauth2
- Wiki
创建一个合并请求审查评论
测试环境
https://testforgeplus.trustie.net
测试环境
https://testforgeplus.trustie.net
POST
https://testforgeplus.trustie.net
最后修改时间:2025-02-07 02:43:27
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Path 参数
owner
string
项目拥有者用户标识
repo
string
项目标识
index
string
合并请求序号
Cookie 参数
autologin_trustie
string
可选
默认值:
3acc38c27d61a347f5c16fbca2c4964b181a2f79
Body 参数application/json
type
string
评论类型
note
string
评论内容
review_id
string
审查ID
line_code
string
行号
commit_id
string
提交标识
path
string
文件路径
parent_id
integer
父评论ID
diff
object
文件diff内容
name
string
必需
oldname
string
必需
addition
integer
必需
deletion
integer
必需
type
integer
必需
is_created
boolean
必需
is_deleted
boolean
必需
is_bin
boolean
必需
is_lfs_file
boolean
必需
is_renamed
boolean
必需
is_ambiguous
boolean
必需
is_submodule
boolean
必需
sections
array [object {3}]
必需
is_incomplete
boolean
必需
is_incomplete_line_too_long
boolean
必需
is_protected
boolean
必需
示例
{
"type": "problem",
"note": "测试评论",
"review_id": "10",
"line_code": "70eede447ccc01c1902260fd377af5d90be28e0d_0_29",
"commit_id": "70eede447ccc01c1902260fd377af5d90be28e0d",
"path": "Gemfile.lock",
"diff": {
"name": "README.md",
"oldname": "README.md",
"addition": 1,
"deletion": 2,
"type": 2,
"is_created": false,
"is_deleted": false,
"is_bin": false,
"is_lfs_file": false,
"is_renamed": false,
"is_ambiguous": false,
"is_submodule": false,
"sections": [
{
"file_name": "README.md",
"name": "",
"lines": [
{
"left_index": 0,
"right_index": 0,
"match": 0,
"type": 4,
"content": "@@ -1,2 +1 @@",
"section_path": "README.md",
"section_last_left_index": 0,
"section_last_right_index": 0,
"section_left_index": 1,
"section_right_index": 1,
"section_left_hunk_size": 2,
"section_right_hunk_size": 0
},
{
"left_index": 1,
"right_index": 0,
"match": 3,
"type": 3,
"content": "-# ceshi_commit"
},
{
"left_index": 2,
"right_index": 0,
"match": -1,
"type": 3,
"content": "-"
},
{
"left_index": 0,
"right_index": 1,
"match": 1,
"type": 2,
"content": "+adsa"
}
]
},
{
"file_name": "README.md",
"name": "",
"lines": [
{
"left_index": 0,
"right_index": 0,
"match": 0,
"type": 4,
"content": " ",
"section_path": "README.md",
"section_last_left_index": 0,
"section_last_right_index": 1,
"section_left_index": 3,
"section_right_index": 2,
"section_left_hunk_size": 0,
"section_right_hunk_size": 0
}
]
}
],
"is_incomplete": false,
"is_incomplete_line_too_long": false,
"is_protected": false
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://testforgeplus.trustie.net/api/v1///pulls//journals.json' \
--header 'Cookie: autologin_trustie=3acc38c27d61a347f5c16fbca2c4964b181a2f79' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "problem",
"note": "测试评论",
"review_id": "10",
"line_code": "70eede447ccc01c1902260fd377af5d90be28e0d_0_29",
"commit_id": "70eede447ccc01c1902260fd377af5d90be28e0d",
"path": "Gemfile.lock",
"diff": {
"name": "README.md",
"oldname": "README.md",
"addition": 1,
"deletion": 2,
"type": 2,
"is_created": false,
"is_deleted": false,
"is_bin": false,
"is_lfs_file": false,
"is_renamed": false,
"is_ambiguous": false,
"is_submodule": false,
"sections": [
{
"file_name": "README.md",
"name": "",
"lines": [
{
"left_index": 0,
"right_index": 0,
"match": 0,
"type": 4,
"content": "@@ -1,2 +1 @@",
"section_path": "README.md",
"section_last_left_index": 0,
"section_last_right_index": 0,
"section_left_index": 1,
"section_right_index": 1,
"section_left_hunk_size": 2,
"section_right_hunk_size": 0
},
{
"left_index": 1,
"right_index": 0,
"match": 3,
"type": 3,
"content": "-# ceshi_commit"
},
{
"left_index": 2,
"right_index": 0,
"match": -1,
"type": 3,
"content": "-"
},
{
"left_index": 0,
"right_index": 1,
"match": 1,
"type": 2,
"content": "+adsa"
}
]
},
{
"file_name": "README.md",
"name": "",
"lines": [
{
"left_index": 0,
"right_index": 0,
"match": 0,
"type": 4,
"content": " ",
"section_path": "README.md",
"section_last_left_index": 0,
"section_last_right_index": 1,
"section_left_index": 3,
"section_right_index": 2,
"section_left_hunk_size": 0,
"section_right_hunk_size": 0
}
]
}
],
"is_incomplete": false,
"is_incomplete_line_too_long": false,
"is_protected": false
}
}'
返回响应
🟢200成功
application/json
Body
id
integer
评论ID
note
string
评论内容
commit_id
null
提交标识
line_code
string
评论行数
path
string
评论文件路径
diff
object
评论文件diff内容
need_respond
boolean
评论是否要回应
state
string
评论状态
parent_id
integer
父评论ID
user
object
评论创建者
id
integer
必需
type
string
必需
name
string
必需
login
string
必需
image_url
string
必需
review
object
评论所属评审
reviewer
object
必需
pull_request
object
必需
id
integer
必需
commit_id
string
必需
content
string
必需
status
string
必需
created_at
string
必需
resolveer
object
评论解决者
id
integer
必需
type
string
必需
name
string
必需
login
string
必需
image_url
string
必需
resolve_at
string
评论解决时间
created_at
string
评论创建时间
updated_at
string
评论更新时间
示例
{
"id": 200,
"note": "测试评论修改",
"commit_id": null,
"line_code": "70eede447ccc01c1902260fd377af5d90be28e0d_0_29",
"path": "Gemfile.lock",
"diff": {},
"need_respond": true,
"state": "resolved",
"user": {
"id": 2,
"type": "User",
"name": "heh",
"login": "yystopf",
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
},
"review": {
"reviewer": {
"id": 2,
"type": "User",
"name": "heh",
"login": "yystopf",
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
},
"pull_request": {
"id": 163,
"title": "新合并请求1",
"body": null,
"head": "master_1",
"base": "master",
"is_original": false,
"index": 1,
"status": "closed",
"issue": {
"id": 260,
"author": {
"id": 2,
"type": "User",
"name": "heh",
"login": "yystopf",
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
},
"priority": null,
"version": null,
"journals_count": 0,
"issue_tags": null
},
"reviewers": [],
"journals_count": 9
},
"id": 10,
"commit_id": "1",
"content": "新建一个审查",
"status": "common",
"created_at": "2022-07-26 11:45"
},
"resolveer": {
"id": 2,
"type": "User",
"name": "heh",
"login": "yystopf",
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
},
"resolve_at": "2022-07-27 14:50",
"created_at": "2022-07-27 14:31",
"updated_at": "2022-07-27 14:50"
}
修改于 2025-02-07 02:43:27