新增:reviewers修改入口

This commit is contained in:
2022-07-26 16:45:53 +08:00
parent 6183f1f76d
commit a35db9fe80
9 changed files with 113 additions and 3 deletions

View File

@@ -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": []
}
```
@@ -586,6 +590,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>
## 获取合并请求版本列表
获取合并请求版本列表