diff --git a/app/docs/slate/source/includes/_repositories.md b/app/docs/slate/source/includes/_repositories.md index a44d2b35d..9238615e4 100644 --- a/app/docs/slate/source/includes/_repositories.md +++ b/app/docs/slate/source/includes/_repositories.md @@ -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` ### 请求参数: 参数 | 必选 | 默认 | 类型 | 字段说明 @@ -1200,15 +1200,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,12 +1226,10 @@ 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|创建时间| 参数| 含义| @@ -1266,11 +1264,8 @@ 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", @@ -1305,15 +1300,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 +1316,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 +1329,24 @@ await octokit.request('POST /api/yystopf/ceshi/webhooks.json') --------- | ------- | ------- | |create|创建分支或标签| |delete|分支或标签删除| -|fork|仓库被fork| + |push|git仓库推送| -|issue|疑修已打开、已关闭、已重新打开或编辑| + |pull_request|合并请求| |pull_request_assign|合并请求被指派| -|pull_request_label|合并请求被贴上标签| + |pull_request_review_approved|合并请求被批准| |pull_request_review_rejected|合并请求被拒绝| -|pull_request_review_comment|合并请求被提出审查意见| + > 请求的JSON示例: @@ -1385,15 +1379,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" } ```