mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
merge from develop
This commit is contained in:
@@ -60,6 +60,7 @@ await octokit.request('GET /api/v1/yystopf/ceshi_commit/pulls/1.json')
|
||||
|last_review.status |string|最后一个审查的状态,common: 一般审查, approved: 通过, rejected: 拒绝通过|
|
||||
|last_review.created_at|string|审查创建的时间|
|
||||
|last_review.reviewer |object|审查创建人|
|
||||
|reviewers |array|指定审查用户标识数组|
|
||||
|conflict_files |array|有冲突的文件|
|
||||
|
||||
> 返回的JSON示例:
|
||||
@@ -118,6 +119,9 @@ await octokit.request('GET /api/v1/yystopf/ceshi_commit/pulls/1.json')
|
||||
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
|
||||
}
|
||||
},
|
||||
"reviewers": [
|
||||
"yystopf"
|
||||
],
|
||||
"conflict_files": []
|
||||
}
|
||||
```
|
||||
@@ -497,10 +501,17 @@ await octokit.request('GET /api/v1/yystopf/ceshi_commit/pulls.json')
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
--------- | ------- | ------- | -------- | ----------
|
||||
|owner |是| |string |用户登录名 |
|
||||
|repo |是| |string |项目标识identifier |
|
||||
|
||||
|
||||
|owner |是| |string |用户登录名 |
|
||||
|repo |是| |string |项目标识identifier |
|
||||
|keyword |否| |string |搜索关键词|
|
||||
|status |否| | int | 合并请求类型 0: 开启的, 1: 合并的 2: 关闭的,不传则为全部的 |
|
||||
|priority_id |否| | int | 优先级ID |
|
||||
|issue_tag_id |否| |int|标记ID|
|
||||
|version_id |否| |int|里程碑ID|
|
||||
|reviewer_id |否| |int| 审查人员ID|
|
||||
|assign_user_id |否| |int| 指派人员ID|
|
||||
|sort_by |否| created_at |string| 排序字段,created_at: 创建时间, updated_at: 更新时间|
|
||||
|sort_direction |否| desc |string| 排序类型 desc: 倒序 asc: 正序|
|
||||
### 返回字段说明:
|
||||
参数 | 类型 | 字段说明
|
||||
--------- | ----------- | -----------
|
||||
@@ -586,6 +597,100 @@ await octokit.request('GET /api/v1/yystopf/ceshi_commit/pulls.json')
|
||||
}
|
||||
```
|
||||
|
||||
## 创建一个合并请求
|
||||
为仓库创建一个合并请求
|
||||
|
||||
> 示例:
|
||||
|
||||
```shell
|
||||
curl -X POST \
|
||||
http://localhost:3000/api/yystopf/ceshi/pulls.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('POST /api/yystopf/ceshi/pulls.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`POST /api/:owner/:repo/pulls.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
--------- | ------- | ------- | -------- | ----------
|
||||
|owner |是| | string |用户登录名 |
|
||||
|repo |是| | string |项目标识identifier |
|
||||
|title |是| | string |合并请求标题|
|
||||
|body |否| | string |合并请求内容|
|
||||
|base |是| | string |目标分支|
|
||||
|head |是| | string |源分支|
|
||||
|is_original |是| | bool |是否为fork仓库发来的合并请求|
|
||||
|fork_project_id |否| | integer|fork仓库ID|
|
||||
|reviewer_ids |否| | array |审查人员id数组|
|
||||
|assigned_to_id |否| | integer|指派人员ID|
|
||||
|fixed_version_id |否| | integer|里程碑ID|
|
||||
|issue_tag_ids |否| | array |标记ID数组|
|
||||
|priority_id |否| | integer|优先级ID|
|
||||
|receivers_login |否| | array |@人员的login|
|
||||
|
||||
> 请求的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "324",
|
||||
"assigned_to_id": "2",
|
||||
"fixed_version_id": "",
|
||||
"issue_tag_ids": [],
|
||||
"priority_id": "2",
|
||||
"body": "312",
|
||||
"head": "new_branch_1",
|
||||
"base": "master",
|
||||
"is_original": false,
|
||||
"fork_project_id": "",
|
||||
"files_count": 1,
|
||||
"commits_count": 1,
|
||||
"reviewer_ids": [],
|
||||
"receivers_login": []
|
||||
}
|
||||
```
|
||||
|
||||
> 返回的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": 0,
|
||||
"message": "响应成功",
|
||||
"pull_request_id": 169,
|
||||
"pull_request_number": 6,
|
||||
"pull_request_status": 0,
|
||||
"pull_request_head": "new_branch_1",
|
||||
"pull_request_base": "master",
|
||||
"pull_request_staus": "open",
|
||||
"is_original": false,
|
||||
"fork_project_id": null,
|
||||
"fork_project_identifier": null,
|
||||
"fork_project_user": null,
|
||||
"reviewers": [
|
||||
"yystopf"
|
||||
],
|
||||
"id": 266,
|
||||
"name": "324",
|
||||
"pr_time": "1分钟前",
|
||||
"assign_user_name": "heh",
|
||||
"assign_user_login": "yystopf",
|
||||
"author_name": "heh",
|
||||
"author_login": "yystopf",
|
||||
"avatar_url": "system/lets/letter_avatars/2/H/188_239_142/120.png",
|
||||
"priority": "正常",
|
||||
"version": null,
|
||||
"journals_count": 0,
|
||||
"issue_tags": null
|
||||
}
|
||||
```
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
|
||||
|
||||
## 获取合并请求版本列表
|
||||
获取合并请求版本列表
|
||||
|
||||
@@ -901,6 +1006,108 @@ await octokit.request('GET /api/v1/yystopf/ceshi_commit/pulls/3/versions/33/diff
|
||||
}
|
||||
```
|
||||
|
||||
## 获取合并请求审查列表
|
||||
获取合并请求版本审查列表
|
||||
|
||||
> 示例:
|
||||
|
||||
```shell
|
||||
curl -X GET http://localhost:3000/api/v1/yystopf/ceshi_commit/pulls/3/reviews.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('GET /api/v1/yystopf/ceshi_commit/pulls/3/reviews.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`GET /api/v1/:owner/:repo/pulls/:index/reviews.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
--------- | ------- | ------- | -------- | ----------
|
||||
|owner |是| |string |用户登录名 |
|
||||
|repo |是| |string |项目标识identifier |
|
||||
|index |是| | int |合并请求序号|
|
||||
|
||||
### 返回字段说明:
|
||||
参数 | 类型 | 字段说明
|
||||
--------- | ----------- | -----------
|
||||
|total_count |int |审查总数|
|
||||
|reviews.reviewer |object |审查者 |
|
||||
|reviews.pull_request.id |integer|合并请求ID|
|
||||
|reviews.pull_request.title |string|合并请求标题|
|
||||
|reviews.pull_request.body |string|合并请求内容|
|
||||
|reviews.pull_request.head |string|合并请求源分支|
|
||||
|reviews.pull_request.base |string|合并请求目标分支|
|
||||
|reviews.pull_request.is_original |string|合并请求是否从fork仓库所来|
|
||||
|reviews.pull_request.fork_project.id |int|fork仓库的id|
|
||||
|reviews.pull_request.fork_project.identifier|string|fork仓库的标识|
|
||||
|reviews.pull_request.fork_project.login |string|fork仓库拥有者的标识|
|
||||
|reviews.pull_request.index |string|合并请求的序号|
|
||||
|reviews.pull_request.status |string|合并请求的状态,open: 打开的, merged: 合并的, closed: 关闭的|
|
||||
|reviews.pull_request.issue.id |integer|合并请求下疑修的ID|
|
||||
|reviews.pull_request.issue.author |object|合并请求以及疑修的创建着|
|
||||
|reviews.pull_request.issue.priority |string|疑修的优先级|
|
||||
|reviews.pull_request.issue.version |string|疑修的里程碑|
|
||||
|reviews.pull_request.issue.journals_count|integer|普通评论数量|
|
||||
|reviews.pull_request.issue.issue_tags |array|所属标记|
|
||||
|reviews.pull_request.journals_count |integer|审查评论数量|
|
||||
|reviews.id |integer|审查ID|
|
||||
|reviews.commit_id |string|审查的commit ID|
|
||||
|reviews.content |string|审查的内容|
|
||||
|reviews.status |string|审查类型,common: 普通, approved: 通过,rejected: 拒绝通过|
|
||||
|reviews.created_at |string|审查创建时间|
|
||||
|
||||
> 返回的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"total_count": 1,
|
||||
"reviews": [
|
||||
{
|
||||
"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": 8
|
||||
},
|
||||
"id": 5,
|
||||
"commit_id": null,
|
||||
"content": "新建一个审查",
|
||||
"status": "common",
|
||||
"created_at": "2022-07-25 17:08"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 为合并请求创建一个审查
|
||||
合并请求创建一个审查
|
||||
|
||||
@@ -1010,3 +1217,484 @@ await octokit.request('POST /api/v1/yystopf/ceshi/pulls/1/reviews.json')
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
|
||||
|
||||
## 获取合并请求评论列表
|
||||
获取合并请求版本评论列表
|
||||
|
||||
> 示例:
|
||||
|
||||
```shell
|
||||
curl -X GET http://localhost:3000/api/v1/yystopf/ceshi_commit/pulls/3/journals.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('GET /api/v1/yystopf/ceshi_commit/pulls/3/journals.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`GET /api/v1/:owner/:repo/pulls/:index/journals.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
--------- | ------- | ------- | -------- | ----------
|
||||
|owner |是| |string |用户登录名 |
|
||||
|repo |是| |string |项目标识identifier |
|
||||
|index |是| | int |合并请求序号|
|
||||
|keyword |否| |string |搜索关键词|
|
||||
|review_id |否| |integer|审查ID|
|
||||
|need_respond |否| |bool |是否需要回应|
|
||||
|state |否| |string |状态, opened: 开启的, resolved: 已解决的, disabled: 无效的|
|
||||
|parent_id |否| |integer|父评论ID|
|
||||
|sort_by |否|created_on|string |排序字段 created_on: 创建时间, updated_on: 更新时间|
|
||||
|sort_direction |否|asc |string |排序类型 desc: 倒序, asc: 正序|
|
||||
|
||||
### 返回字段说明:
|
||||
参数 | 类型 | 字段说明
|
||||
--------- | ----------- | -----------
|
||||
|total_count |int |评论总数|
|
||||
|journals.id |int |评论ID|
|
||||
|journals.notes |string |评论内容|
|
||||
|journals.commit_id |string |CommitID|
|
||||
|journals.line_code |string |评论行数|
|
||||
|journals.path |string |评论文件路径|
|
||||
|journals.diff |object |评论文件diff内容|
|
||||
|journals.need_respond |bool |评论是否要回应|
|
||||
|journals.state |string |评论状态,opened: 开启的, resolved: 已解决的, disabled: 无效的 |
|
||||
|journals.parent_id |int |父评论ID|
|
||||
|journals.user |object |评论创建者|
|
||||
|journals.review |object |评论所属评审|
|
||||
|journals.resolveer |object |评论解决者|
|
||||
|journals.resolve_at |int |评论解决时间|
|
||||
|journals.created_at |int |评论创建时间|
|
||||
|journals.updated_at |int |评论更新时间|
|
||||
|
||||
> 返回的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"total_count": 1,
|
||||
"journals": [
|
||||
{
|
||||
"id": 200,
|
||||
"note": "测试评论修改",
|
||||
"commit_id": null,
|
||||
"line_code": "70eede447ccc01c1902260fd377af5d90be28e0d_0_29",
|
||||
"path": "Gemfile.lock",
|
||||
"diff": {},
|
||||
"need_respond": true,
|
||||
"state": "resolved",
|
||||
"parent_id": nil,
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 创建一个合并请求评论
|
||||
为仓库创建一个合并请求的评论
|
||||
|
||||
> 示例:
|
||||
|
||||
```shell
|
||||
curl -X POST \
|
||||
http://localhost:3000/api/v1/yystopf/ceshi/pulls/1/journals.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('POST /api/v1/yystopf/ceshi/pulls/1/journals.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`POST /api/v1/:owner/:repo/pulls/:index/journals.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
--------- | ------- | ------- | -------- | ----------
|
||||
|owner |是| | string |用户登录名 |
|
||||
|repo |是| | string |项目标识identifier |
|
||||
|index |是| | integer|合并请求序号|
|
||||
|type |是| | string |评论类型 comment: 普通, problem: 需要回应的评论|
|
||||
|note |否| | string |评论内容|
|
||||
|review_id |是| | string |审查ID|
|
||||
|line_code |否| | string |行号|
|
||||
|commit_id |否| | bool |commitID|
|
||||
|path |否| | integer|文件路径|
|
||||
|parent_id |否| | integer|父评论ID|
|
||||
|diff |否| | array |文件diff内容|
|
||||
|
||||
> 请求的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> 返回的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"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"
|
||||
}
|
||||
```
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
|
||||
## 修改一个合并请求评论
|
||||
修改一个仓库合并请求的评论
|
||||
|
||||
> 示例:
|
||||
|
||||
```shell
|
||||
curl -X PATCH \
|
||||
http://localhost:3000/api/v1/yystopf/ceshi/pulls/1/journals/200.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('PATCH /api/v1/yystopf/ceshi/pulls/1/journals/200.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`PATCH /api/v1/:owner/:repo/pulls/:index/journals/:id.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
--------- | ------- | ------- | -------- | ----------
|
||||
|owner |是| | string |用户登录名 |
|
||||
|repo |是| | string |项目标识identifier |
|
||||
|index |是| | integer|合并请求序号|
|
||||
|id |是| | integer|评论ID|
|
||||
|note |是| | string |评论内容|
|
||||
|commit_id |是| | string |commitID|
|
||||
|state |是| | string |评论状态, opened: 开启的, resolved: 已解决的, disabled: 无效的|
|
||||
|
||||
> 请求的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"note": "测试评论",
|
||||
"commit_id": "70eede447ccc01c1902260fd377af5d90be28e0d",
|
||||
"state": "resolved"
|
||||
}
|
||||
```
|
||||
|
||||
> 返回的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"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"
|
||||
}
|
||||
```
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
|
||||
## 删除合并请求的一个评论
|
||||
删除合并请求的一个评论
|
||||
|
||||
> 示例:
|
||||
|
||||
```shell
|
||||
curl -X DELETE \
|
||||
http://localhost:3000/api/v1/yystopf/ceshi/pulls/1/journals/200.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('DELETE /api/v1/yystopf/ceshi/pulls/1/journals/200.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`DELETE /api/v1/:owner/:repo/pulls/:index/journals/:id.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
--------- | ------- | ------- | -------- | ----------
|
||||
|owner |是| | string |用户登录名 |
|
||||
|repo |是| | string |项目标识identifier |
|
||||
|index |是| | integer|合并请求序号|
|
||||
|id |是| | integer|评论ID |
|
||||
|
||||
### 返回字段说明:
|
||||
|
||||
> 返回的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": 0,
|
||||
"message": "success"
|
||||
}
|
||||
```
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user