mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
merge from develop
This commit is contained in:
@@ -1115,15 +1115,15 @@ await octokit.request('GET /api/yystopf/csfjkkj/contributors.json')
|
||||
|
||||
```shell
|
||||
curl -X GET \
|
||||
http://localhost:3000/api/yystopf/ceshi/webhooks.json
|
||||
http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('GET /api/yystopf/ceshi/webhooks.json')
|
||||
await octokit.request('GET /api/v1/yystopf/ceshi/webhooks.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`GET /api/:owner/:repo/webhooks.json`
|
||||
`GET /api/v1/:owner/:repo/webhooks.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
@@ -1139,7 +1139,6 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks.json')
|
||||
|url |string|地址|
|
||||
|http_method |string|请求方式|
|
||||
|is_active |bool |是否激活|
|
||||
|type |string|类型|
|
||||
|last_status |string|最后一次推送的状态|
|
||||
|create_time |string|创建时间|
|
||||
|
||||
@@ -1155,7 +1154,6 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks.json')
|
||||
"url": "https://oapi.dingtalk.com/robot/send?access_token=7e1e19d0eddb6a5e33c5c2c4e66f4c88f9437184b9ed2c2653194c6374c7d513",
|
||||
"http_method": "",
|
||||
"is_active": true,
|
||||
"type": "dingtalk",
|
||||
"last_status": "succeed",
|
||||
"create_time": "2021-07-12 10:50:07"
|
||||
},
|
||||
@@ -1164,7 +1162,6 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks.json')
|
||||
"url": "http://localhost:3000",
|
||||
"http_method": "GET",
|
||||
"is_active": true,
|
||||
"type": "gitea",
|
||||
"last_status": "succeed",
|
||||
"create_time": "2021-07-26 10:03:45"
|
||||
},
|
||||
@@ -1173,7 +1170,6 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks.json')
|
||||
"url": "http://localhost:10081",
|
||||
"http_method": "POST",
|
||||
"is_active": true,
|
||||
"type": "gitea",
|
||||
"last_status": "waiting",
|
||||
"create_time": "2021-07-26 16:56:53"
|
||||
},
|
||||
@@ -1182,7 +1178,6 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks.json')
|
||||
"url": "http://localhost:3001",
|
||||
"http_method": "POST",
|
||||
"is_active": true,
|
||||
"type": "gitea",
|
||||
"last_status": "fail",
|
||||
"create_time": "2021-07-26 16:58:23"
|
||||
}
|
||||
@@ -1200,15 +1195,15 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks.json')
|
||||
|
||||
```shell
|
||||
curl -X GET \
|
||||
http://localhost:3000/api/yystopf/ceshi/webhooks/3/edit.json
|
||||
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('GET /api/yystopf/ceshi/webhooks/3/edit.json')
|
||||
await octokit.request('GET /api/v1/yystopf/ceshi/webhooks/3.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`GET /api/:owner/:repo/webhooks/:id/edit.json`
|
||||
`GET /api/v1/:owner/:repo/webhooks/:id.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
@@ -1226,36 +1221,21 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks/3/edit.json')
|
||||
|content_type |string|POST Content Type|
|
||||
|http_method |string|请求方式|
|
||||
|secret| |string|密钥|
|
||||
|is_active |bool |是否激活|
|
||||
|type |string|类型|
|
||||
|last_status |string|最后一次推送的状态, waiting 等待,fail 失败,succeed 成功|
|
||||
|active |bool |是否激活|
|
||||
|branch_filter |string|分支过滤|
|
||||
|events |string|触发条件|
|
||||
|create_time |string|创建时间|
|
||||
|create_at |string|创建时间|
|
||||
|
||||
|
||||
参数| 含义|
|
||||
--------- | ------- | ------- |
|
||||
|create|创建分支或标签|
|
||||
|delete|分支或标签删除|
|
||||
|fork|仓库被fork|
|
||||
|push|git仓库推送|
|
||||
|issue|疑修已打开、已关闭、已重新打开或编辑|
|
||||
|issue_assign|疑修被指派|
|
||||
|issue_label|疑修标签被更新或删除|
|
||||
|issue_milestone|疑修被收入里程碑|
|
||||
|issue_comment|疑修评论|
|
||||
|pull_request|合并请求|
|
||||
|pull_request_assign|合并请求被指派|
|
||||
|pull_request_label|合并请求被贴上标签|
|
||||
|pull_request_milestone|合并请求被记录于里程碑中|
|
||||
|pull_request_comment|合并请求被评论|
|
||||
|pull_request_review_approved|合并请求被批准|
|
||||
|pull_request_review_rejected|合并请求被拒绝|
|
||||
|pull_request_review_comment|合并请求被提出审查意见|
|
||||
|pull_request_sync|合并请求被同步|
|
||||
|repository|创建或删除仓库|
|
||||
|release|版本发布|
|
||||
|
||||
|
||||
> 返回的JSON示例:
|
||||
@@ -1266,31 +1246,15 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks/3/edit.json')
|
||||
"http_method": "GET",
|
||||
"content_type": "form",
|
||||
"url": "http://localhost:3000",
|
||||
"secret": "123456",
|
||||
"last_status": "succeed",
|
||||
"is_active": true,
|
||||
"type": "gitea",
|
||||
"create_time": "2021-07-26 10:03:45",
|
||||
"active": true,
|
||||
"create_at": "2021-07-26 10:03",
|
||||
"branch_filter": "*",
|
||||
"events": [
|
||||
"create",
|
||||
"delete",
|
||||
"fork",
|
||||
"issues",
|
||||
"issue_assign",
|
||||
"issue_label",
|
||||
"issue_milestone",
|
||||
"issue_comment",
|
||||
"push",
|
||||
"pull_request",
|
||||
"pull_request_assign",
|
||||
"pull_request_label",
|
||||
"pull_request_milestone",
|
||||
"pull_request_comment",
|
||||
"pull_request_review",
|
||||
"pull_request_sync",
|
||||
"repository",
|
||||
"release"
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -1305,15 +1269,15 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks/3/edit.json')
|
||||
|
||||
```shell
|
||||
curl -X POST \
|
||||
http://localhost:3000/api/yystopf/ceshi/webhooks.json
|
||||
http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('POST /api/yystopf/ceshi/webhooks.json')
|
||||
await octokit.request('POST /api/v1/yystopf/ceshi/webhooks.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`POST /api/:owner/:repo/webhooks.json`
|
||||
`POST /api/v1/:owner/:repo/webhooks.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
@@ -1321,7 +1285,6 @@ await octokit.request('POST /api/yystopf/ceshi/webhooks.json')
|
||||
|owner |是| | string |用户登录名 |
|
||||
|repo |是| | string |项目标识identifier |
|
||||
|webhook.url |是| | string |目标url |
|
||||
|webhook.type |否| | string |类型|
|
||||
|webhook.http_method |是| | string | http方法, POST和GET |
|
||||
|webhook.content_type |是| | string | POST Content Type |
|
||||
|webhook.secret |否| | string |密钥文本|
|
||||
@@ -1335,24 +1298,11 @@ await octokit.request('POST /api/yystopf/ceshi/webhooks.json')
|
||||
--------- | ------- | ------- |
|
||||
|create|创建分支或标签|
|
||||
|delete|分支或标签删除|
|
||||
|fork|仓库被fork|
|
||||
|push|git仓库推送|
|
||||
|issue|疑修已打开、已关闭、已重新打开或编辑|
|
||||
|issue_assign|疑修被指派|
|
||||
|issue_label|疑修标签被更新或删除|
|
||||
|issue_milestone|疑修被收入里程碑|
|
||||
|issue_comment|疑修评论|
|
||||
|pull_request|合并请求|
|
||||
|pull_request_assign|合并请求被指派|
|
||||
|pull_request_label|合并请求被贴上标签|
|
||||
|pull_request_milestone|合并请求被记录于里程碑中|
|
||||
|pull_request_comment|合并请求被评论|
|
||||
|pull_request_review_approved|合并请求被批准|
|
||||
|pull_request_review_rejected|合并请求被拒绝|
|
||||
|pull_request_review_comment|合并请求被提出审查意见|
|
||||
|pull_request_sync|合并请求被同步|
|
||||
|repository|创建或删除仓库|
|
||||
|release|版本发布|
|
||||
|
||||
|
||||
> 请求的JSON示例:
|
||||
@@ -1385,15 +1335,22 @@ await octokit.request('POST /api/yystopf/ceshi/webhooks.json')
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 18,
|
||||
"type": "gitea",
|
||||
"id": 68,
|
||||
"content_type": "json",
|
||||
"url": "http://localhost:10000",
|
||||
"http_method": "GET",
|
||||
"url": "http://127.0.0.1:3000",
|
||||
"events": [
|
||||
"push"
|
||||
"create",
|
||||
"delete",
|
||||
"push",
|
||||
"pull_request",
|
||||
"pull_request_assign",
|
||||
"pull_request_review_approved",
|
||||
"pull_request_review_rejected"
|
||||
],
|
||||
"active": true,
|
||||
"create_time": "2021-07-26 18:53:43"
|
||||
"branch_filter": "*",
|
||||
"created_at": "2022-06-23 15:52"
|
||||
}
|
||||
```
|
||||
<aside class="success">
|
||||
@@ -1407,15 +1364,15 @@ await octokit.request('POST /api/yystopf/ceshi/webhooks.json')
|
||||
|
||||
```shell
|
||||
curl -X PATCH \
|
||||
http://localhost:3000/api/yystopf/ceshi/webhooks/7.json
|
||||
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('PATCH /api/yystopf/ceshi/webhooks/7.json')
|
||||
await octokit.request('PATCH /api/v1/yystopf/ceshi/webhooks/7.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`PATCH /api/:owner/:repo/webhooks/:id.json`
|
||||
`PATCH /api/v1/:owner/:repo/webhooks/68.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
@@ -1424,7 +1381,6 @@ await octokit.request('PATCH /api/yystopf/ceshi/webhooks/7.json')
|
||||
|repo |是| | string |项目标识identifier |
|
||||
|id |是| | string |webhook id |
|
||||
|webhook.url |是| | string |目标url |
|
||||
|webhook.type |否| | string |类型|
|
||||
|webhook.http_method |是| | string | http方法, POST和GET |
|
||||
|webhook.content_type |是| | string | POST Content Type |
|
||||
|webhook.secret |否| | string |密钥文本|
|
||||
@@ -1438,24 +1394,11 @@ await octokit.request('PATCH /api/yystopf/ceshi/webhooks/7.json')
|
||||
--------- | ------- | ------- |
|
||||
|create|创建分支或标签|
|
||||
|delete|分支或标签删除|
|
||||
|fork|仓库被fork|
|
||||
|push|git仓库推送|
|
||||
|issue|疑修已打开、已关闭、已重新打开或编辑|
|
||||
|issue_assign|疑修被指派|
|
||||
|issue_label|疑修标签被更新或删除|
|
||||
|issue_milestone|疑修被收入里程碑|
|
||||
|issue_comment|疑修评论|
|
||||
|pull_request|合并请求|
|
||||
|pull_request_assign|合并请求被指派|
|
||||
|pull_request_label|合并请求被贴上标签|
|
||||
|pull_request_milestone|合并请求被记录于里程碑中|
|
||||
|pull_request_comment|合并请求被评论|
|
||||
|pull_request_review_approved|合并请求被批准|
|
||||
|pull_request_review_rejected|合并请求被拒绝|
|
||||
|pull_request_review_comment|合并请求被提出审查意见|
|
||||
|pull_request_sync|合并请求被同步|
|
||||
|repository|创建或删除仓库|
|
||||
|release|版本发布|
|
||||
|
||||
|
||||
> 请求的JSON示例:
|
||||
@@ -1478,8 +1421,22 @@ await octokit.request('PATCH /api/yystopf/ceshi/webhooks/7.json')
|
||||
|
||||
```json
|
||||
{
|
||||
"status": 0,
|
||||
"message": "success"
|
||||
"id": 68,
|
||||
"content_type": "json",
|
||||
"http_method": "GET",
|
||||
"url": "http://127.0.0.1:3000",
|
||||
"events": [
|
||||
"create",
|
||||
"delete",
|
||||
"push",
|
||||
"pull_request",
|
||||
"pull_request_assign",
|
||||
"pull_request_review_approved",
|
||||
"pull_request_review_rejected"
|
||||
],
|
||||
"active": true,
|
||||
"branch_filter": "*",
|
||||
"created_at": "2022-06-23 15:52"
|
||||
}
|
||||
```
|
||||
<aside class="success">
|
||||
@@ -1494,15 +1451,15 @@ await octokit.request('PATCH /api/yystopf/ceshi/webhooks/7.json')
|
||||
|
||||
```shell
|
||||
curl -X DELETE \
|
||||
http://localhost:3000/api/yystopf/ceshi/webhooks/7.json
|
||||
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('DELETE /api/yystopf/ceshi/webhooks/7.json')
|
||||
await octokit.request('DELETE /api/v1/yystopf/ceshi/webhooks/7.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`DELETE /api/:owner/:repo/webhooks/:id.json`
|
||||
`DELETE /api/v1/:owner/:repo/webhooks/:id.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
@@ -1532,15 +1489,15 @@ await octokit.request('DELETE /api/yystopf/ceshi/webhooks/7.json')
|
||||
|
||||
```shell
|
||||
curl -X GET \
|
||||
http://localhost:3000/api/yystopf/ceshi/webhooks/3/tasks.json
|
||||
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/hooktasks.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('GET /api/yystopf/ceshi/webhooks/3/tasks.json')
|
||||
await octokit.request('GET /api/v1/yystopf/ceshi/webhooks/3/hooktasks.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`GET /api/:owner/:repo/webhooks/:id/tasks.json`
|
||||
`GET /api/v1/:owner/:repo/webhooks/:id/hooktasks.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
@@ -1568,7 +1525,7 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks/3/tasks.json')
|
||||
```json
|
||||
{
|
||||
"total_count": 6,
|
||||
"tasks": [
|
||||
"hooktasks": [
|
||||
{
|
||||
"id": 20,
|
||||
"type": "gitea",
|
||||
@@ -1744,15 +1701,15 @@ await octokit.request('GET /api/yystopf/ceshi/webhooks/3/tasks.json')
|
||||
|
||||
```shell
|
||||
curl -X POST \
|
||||
http://localhost:3000/api/yystopf/ceshi/webhooks/3/test.json
|
||||
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/tests.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('POST /api/yystopf/ceshi/webhooks/3/test.json')
|
||||
await octokit.request('POST /api/v1/yystopf/ceshi/webhooks/3/tests.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`POST /api/:owner/:repo/webhooks/:id/test.json`
|
||||
`POST /api/v1/:owner/:repo/webhooks/:id/tests.json`
|
||||
|
||||
### 请求参数:
|
||||
参数 | 必选 | 默认 | 类型 | 字段说明
|
||||
|
||||
@@ -47,6 +47,105 @@ await octokit.request('GET /api/users/me.json')
|
||||
Success Data.
|
||||
</aside>
|
||||
|
||||
## 用户项目列表
|
||||
获取用户项目列表
|
||||
|
||||
> 示例:
|
||||
|
||||
```shell
|
||||
curl -X GET http://localhost:3000/api/v1/:login/projects.json
|
||||
```
|
||||
|
||||
```javascript
|
||||
await octokit.request('GET /api/v1/:login/projects.json')
|
||||
```
|
||||
|
||||
### HTTP 请求
|
||||
`GET api/v1/yystopf/projects.json`
|
||||
|
||||
### 请求字段说明:
|
||||
参数 | 类型 | 字段说明
|
||||
--------- | ----------- | -----------
|
||||
|login | string | 用户的用户名|
|
||||
|category | string | 归属项目,默认为全部项目, join: 参与项目, created: 创建项目, manage: 管理项目, watched: 关注项目, forked: 复刻项目 |
|
||||
|is_public | boolean | 公/私有项目,true为公开项目,false为私有项目|
|
||||
|project_type | string | 项目类型,common为托管项目, mirror为镜像项目, sync_mirror为同步镜像项目|
|
||||
|sort_by | string | 项目的排序字段,比如 created_on, updated_on等|
|
||||
|sort_direction | string | 排序的类型,desc 倒序,asc 正序|
|
||||
|limit | integer | 每页个数 |
|
||||
|page | integer | 页码 |
|
||||
|
||||
### 返回字段说明:
|
||||
参数 | 类型 | 字段说明
|
||||
--------- | ----------- | -----------
|
||||
|total_count | integer | 项目总数 |
|
||||
|projects.owner.id | integer | 项目拥有者id |
|
||||
|projects.owner.type | string | 项目拥有者类型,User 用户,Organization 组织 |
|
||||
|projects.owner.name | string | 项目拥有者名称|
|
||||
|projects.owner.login | string | 项目拥有者用户名 |
|
||||
|projects.owner.image_url | string | 项目拥有者头像地址 |
|
||||
|type | string | 项目类型,common 托管项目,mirror 镜像项目, sync 同步镜像项目 |
|
||||
|description | string | 项目描述 |
|
||||
|forked_count | integer | 项目复刻数量 |
|
||||
|forked_from_project_id | integer | 项目复刻来源项目 |
|
||||
|identifier | string | 项目标识 |
|
||||
|issues_count | integer | 项目issues数量|
|
||||
|pull_requests_count | integer | 项目合并请求数量 |
|
||||
|invite_code | string | 项目邀请码|
|
||||
|website | string | 项目网址|
|
||||
|platform | string | 项目平台 |
|
||||
|name | string | 项目名称|
|
||||
|open_devops | boolean | 项目是否开启工作流 |
|
||||
|praises_count | integer | 项目点赞数量|
|
||||
|is_public | boolean | 项目是否公开|
|
||||
|status | integer | 项目状态|
|
||||
|watchers_count | integer | 项目关注数量|
|
||||
|ignore_id | integer | 项目ignoreID|
|
||||
|license_id | integer | 项目许可证ID|
|
||||
|project_category_id | integer | 项目分类ID|
|
||||
|project_language_id | integer | 项目语言ID|
|
||||
|
||||
|
||||
> 返回的JSON示例:
|
||||
|
||||
```json
|
||||
"total_count": 1,
|
||||
"projects": [
|
||||
{
|
||||
"owner": {
|
||||
"id": 2,
|
||||
"type": "User",
|
||||
"name": "heh",
|
||||
"login": "yystopf",
|
||||
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
|
||||
},
|
||||
"type": "common",
|
||||
"description": null,
|
||||
"forked_count": 1,
|
||||
"forked_from_project_id": null,
|
||||
"identifier": "hahahah",
|
||||
"issues_count": 5,
|
||||
"pull_requests_count": 3,
|
||||
"invite_code": "8zfKtM",
|
||||
"website": null,
|
||||
"platform": "forge",
|
||||
"name": "hahahah",
|
||||
"open_devops": false,
|
||||
"praises_count": 0,
|
||||
"is_public": true,
|
||||
"status": 1,
|
||||
"watchers_count": 0,
|
||||
"ignore_id": null,
|
||||
"license_id": null,
|
||||
"project_category_id": null,
|
||||
"project_language_id": null
|
||||
}
|
||||
]
|
||||
```
|
||||
<aside class="success">
|
||||
Success Data.
|
||||
</aside>
|
||||
|
||||
## 用户消息列表
|
||||
获取用户消息列表
|
||||
|
||||
|
||||
Reference in New Issue
Block a user