diff --git a/public/docs/api.html b/public/docs/api.html index 86560740d..e9091591e 100644 --- a/public/docs/api.html +++ b/public/docs/api.html @@ -503,7 +503,10 @@ 仓库标签列表
仓库分支列表
+仓库所有分支列表
-示例:
curl -X GET http://localhost:3000/api/yystopf/csfjkkj/branches.json
-
await octokit.request('GET /api/yystopf/csfjkkj/branches.json')
+curl -X GET http://localhost:3000/api/v1/yystopf/csfjkkj/branches/all.json
+
await octokit.request('GET /api/v1/yystopf/csfjkkj/branches/all.json')
HTTP 请求
-GET /api/:owner/:repo/branches.json
+GET /api/v1/:owner/:repo/branches/all.json
请求参数:
@@ -7886,16 +7889,16 @@ http://localhost:3000/api/ceshi1/ceshi_repo1/applied_transfer_projects/organizat
"tar_url": "http://localhost:3000/api/yystopf/hahahah/archive/touch-100.tar.gz"
}
]
-仓库贡献者列表
-仓库贡献者列表
+仓库创建分支
+为仓库创建一个新的分支
示例:
-curl -X GET http://localhost:3000/api/yystopf/csfjkkj/contributors.json
-
await octokit.request('GET /api/yystopf/csfjkkj/contributors.json')
+curl -X POST http://localhost:3000/api/v1/yystopf/csfjkkj/branches.json
+
await octokit.request('POST /api/v1/yystopf/csfjkkj/branches.json')
HTTP 请求
-GET /api/:owner/:repo/contributors.json
+POST /api/v1/:owner/:repo/branches.json
请求参数:
@@ -7920,6 +7923,20 @@ http://localhost:3000/api/ceshi1/ceshi_repo1/applied_transfer_projects/organizat
string
项目标识identifier
+
+new_branch_name
+是||string
+新分支名称
+
+
+
+
+old_branch_name
+否|
+string
+来源分支名称
+
+
返回字段说明:
@@ -7930,6 +7947,202 @@ http://localhost:3000/api/ceshi1/ceshi_repo1/applied_transfer_projects/organizat
+name
+string
+分支名称
+
+
+commit.id
+string
+提交ID
+
+
+commit.message
+string
+提交信息
+
+
+commit.author.id
+string
+提交作者ID
+
+
+commit.author.login
+string
+提交作者标识
+
+
+commit.author.name
+string
+提交作者名称
+
+
+commit.author.type
+string
+提交作者类型
+
+
+commit.committer.id
+string
+提交者ID
+
+
+commit.committer.login
+string
+提交者标识
+
+
+commit.committer.name
+string
+提交者名称
+
+
+commit.committer.type
+string
+提交者类型
+
+
+commit.committer.image_url
+string
+提交者头像
+
+
+commit.time_ago
+string
+分支最新提交时间距现在时间差
+
+
+commit.timestamp
+string
+分支最新提交时间
+
+
+protected
+bool
+是否为保护分支
+
+
+user_can_push
+bool
+当前用户是否能提交
+
+
+user_can_merge
+bool
+当前用户是否能合并
+
+
+commit_id
+string
+提交ID
+
+
+commit_time_from_now
+string
+分支最新提交时间距现在时间差
+
+
+commit_time
+string
+分支最新提交时间
+
+
+http_url
+string
+分支http地址
+
+
+zip_url
+string
+分支zip包下载地址
+
+
+tar_url
+string
+分支tar包下载地址
+
+
+
+
+返回的JSON示例:
+
+{
+ "name": "new_branch_8",
+ "commit": {
+ "id": "80dd40214a58622312393b2ae693756a4781fab2",
+ "message": "x拟增\n\nSigned-off-by: yystopf <yystopf@163.com>",
+ "author": {
+ "id": "2",
+ "login": "yystopf",
+ "name": "heh",
+ "type": "User",
+ "image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
+ },
+ "committer": {
+ "id": "2",
+ "login": "yystopf",
+ "name": "heh",
+ "type": "User",
+ "image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
+ },
+ "time_ago": "1天前",
+ "timestamp": "2022-07-13T09:54:15Z"
+ },
+ "protected": false,
+ "user_can_push": true,
+ "user_can_merge": true,
+ "commit_id": "80dd40214a58622312393b2ae693756a4781fab2",
+ "commit_time_from_now": "1天前",
+ "commit_time": "2022-07-13T09:54:15Z",
+ "default_branch": "master",
+ "http_url": "http://127.0.0.1:10081/yystopf/ceshi_hook.git",
+ "zip_url": "http://localhost:3000/api/yystopf/ceshi_hook/archive/new_branch_8.zip",
+ "tar_url": "http://localhost:3000/api/yystopf/ceshi_hook/archive/new_branch_8.tar.gz"
+}
+
仓库贡献者列表
+仓库贡献者列表
+
+
+示例:
+
+curl -X GET http://localhost:3000/api/yystopf/csfjkkj/contributors.json
+
await octokit.request('GET /api/yystopf/csfjkkj/contributors.json')
+
HTTP 请求
+GET /api/:owner/:repo/contributors.json
+请求参数:
+
+
+参数
+必选
+默认
+类型
+字段说明
+
+
+
+owner
+是
+
+string
+用户登录名
+
+
+repo
+是
+
+string
+项目标识identifier
+
+
+返回字段说明:
+
+
+参数
+类型
+字段说明
+
+
+
list.contributions
int
贡献者commit数量
@@ -7986,9 +8199,9 @@ http://localhost:3000/api/ceshi1/ceshi_repo1/applied_transfer_projects/organizat
curl -X GET http://localhost:3000/api/yystopf/csfjkkj/languages.json
await octokit.request('GET /api/yystopf/csfjkkj/languages.json')
-
HTTP 请求
+HTTP 请求
GET /api/:owner/:repo/languages.json
-请求参数:
+请求参数:
参数
@@ -8013,7 +8226,7 @@ http://localhost:3000/api/ceshi1/ceshi_repo1/applied_transfer_projects/organizat
项目标识identifier
-返回字段说明:
+返回字段说明:
参数
@@ -8050,9 +8263,9 @@ http://localhost:3000/api/ceshi1/ceshi_repo1/applied_transfer_projects/organizat
curl -X GET http://localhost:3000/api/jasder/jasder_test/edit.json
await octokit.request('GET /api/jasder/jasder_test/edit.json')
-
HTTP 请求
+HTTP 请求
GET /api/:owner/:repo/edit.json
-请求参数:
+请求参数:
参数
@@ -8077,7 +8290,7 @@ http://localhost:3000/api/ceshi1/ceshi_repo1/applied_transfer_projects/organizat
项目标识identifier
-返回字段说明:
+返回字段说明:
参数
@@ -8154,9 +8367,9 @@ http://localhost:3000/api/ceshi1/ceshi_repo1/applied_transfer_projects/organizat
-d "private=true" \
http://localhost:3000/api/jasder/jasder_test.json
await octokit.request('PATCH /api/jasder/jasder_test.json')
-
HTTP 请求
+HTTP 请求
PATCH /api/:owner/:repo
-请求参数:
+请求参数:
参数
@@ -8216,7 +8429,7 @@ http://localhost:3000/api/jasder/jasder_test.json
项目是否私有, true:为私有,false: 公开,默认为公开
-返回字段说明:
+返回字段说明:
参数
@@ -8281,9 +8494,9 @@ http://localhost:3000/api/jasder/jasder_test.json
curl -X DELETE http://localhost:3000/api/jasder/jasder_test.json
await octokit.request('DELETE /api/jasder/jasder_test.json')
-
HTTP 请求
+HTTP 请求
PATCH /api/:owner/:repo
-请求参数:
+请求参数:
参数
@@ -8308,7 +8521,7 @@ http://localhost:3000/api/jasder/jasder_test.json
项目标识identifier
-返回字段说明:
+返回字段说明:
参数
@@ -8349,83 +8562,8 @@ http://localhost:3000/api/jasder/jasder_test.json
-d "user_id=12" \
http://localhost:3000/api/jasder/jasder_test/collaborators.json
await octokit.request('POST /api/jasder/jasder_test/collaborators.json')
-
HTTP 请求
-POST /api/:owner/:repo/collaborators.json
-请求参数:
-
-
-参数
-必选
-默认
-类型
-字段说明
-
-
-
-owner
-是
-
-string
-用户登录名
-
-
-repo
-是
-
-string
-项目标识identifier
-
-
-user_id
-是
-int
-
-用户id
-
-
-返回字段说明:
-
-
-参数
-类型
-字段说明
-
-
-
-status
-int
-返回状态, 0: 表示操作成功
-
-
-message
-string
-返回信息说明
-
-
-
-
-返回的JSON示例:
-
-{
- "status": 0,
- "message": "success"
-}
-
-
-删除仓库成员
-仓库中删除成员操作
-
-
-示例:
-
-curl -X DELETE \
--d "user_id=12" \
-http://localhost:3000/api/jasder/jasder_test/collaborators.json
-
await octokit.request('DELETE /api/jasder/jasder_test/collaborators.json')
HTTP 请求
-DELETE /api/:owner/:repo/collaborators.json
+POST /api/:owner/:repo/collaborators.json
请求参数:
@@ -8478,6 +8616,81 @@ http://localhost:3000/api/jasder/jasder_test/collaborators.json
+
+返回的JSON示例:
+
+{
+ "status": 0,
+ "message": "success"
+}
+
+
+删除仓库成员
+仓库中删除成员操作
+
+
+示例:
+
+curl -X DELETE \
+-d "user_id=12" \
+http://localhost:3000/api/jasder/jasder_test/collaborators.json
+
await octokit.request('DELETE /api/jasder/jasder_test/collaborators.json')
+
HTTP 请求
+DELETE /api/:owner/:repo/collaborators.json
+请求参数:
+
+
+参数
+必选
+默认
+类型
+字段说明
+
+
+
+owner
+是
+
+string
+用户登录名
+
+
+repo
+是
+
+string
+项目标识identifier
+
+
+user_id
+是
+int
+
+用户id
+
+
+返回字段说明:
+
+
+参数
+类型
+字段说明
+
+
+
+status
+int
+返回状态, 0: 表示操作成功
+
+
+message
+string
+返回信息说明
+
+
+
返回的JSON示例:
@@ -8500,9 +8713,9 @@ http://localhost:3000/api/jasder/jasder_test/collaborators.json
-d "role=Developer" \
http://localhost:3000/api/jasder/jasder_test/change_role.json
await octokit.request('PUT /api/jasder/jasder_test/change_role.json')
-
HTTP 请求
+HTTP 请求
PUT /api/:owner/:repo/change_role.json
-请求参数:
+请求参数:
参数
@@ -8541,7 +8754,7 @@ http://localhost:3000/api/jasder/jasder_test/change_role.json
取值范围:"Manager", "Developer", "Reporter";分别为项目管理人员(拥有所有操作权限)、项目开发人员(只拥有读写权限)、项目报告人员(只拥有读权限)
-返回字段说明:
+返回字段说明:
参数
@@ -8583,9 +8796,9 @@ http://localhost:3000/api/jasder/jasder_test/change_role.json
-d "limit=5" \
http://localhost:3000/api/jasder/jasder_test/collaborators.json
await octokit.request('GET /api/jasder/jasder_test/collaborators.json')
-
HTTP 请求
+HTTP 请求
GET /api/:owner/:repo/collaborators.json
-请求参数:
+请求参数:
参数
@@ -8624,7 +8837,7 @@ http://localhost:3000/api/jasder/jasder_test/collaborators.json
每页多少条数据,默认15条
-返回字段说明:
+返回字段说明:
参数
@@ -8712,9 +8925,9 @@ http://localhost:3000/api/jasder/jasder_test/collaborators.json
-d "ref=develop" \
http://localhost:3000/api/yystopf/ceshi/files.json
await octokit.request('GET /api/yystopf/ceshi/files.json')
-
HTTP 请求
+HTTP 请求
GET /api/:owner/:repo/files
-请求参数:
+请求参数:
参数
@@ -8753,7 +8966,7 @@ http://localhost:3000/api/yystopf/ceshi/files.json
分支名,默认为仓库默认分支
-返回字段说明:
+返回字段说明:
参数
@@ -8835,9 +9048,9 @@ http://localhost:3000/api/yystopf/ceshi/files.json
-d "ref=develop" \
http://localhost:3000//api/jasder/jasder_test/entries.json
await octokit.request('GET /api/jasder/jasder_test/entries.json')
-
HTTP 请求
+HTTP 请求
GET /api/:owner/:repo/entries.json
-请求参数:
+请求参数:
参数
@@ -8869,7 +9082,7 @@ http://localhost:3000//api/jasder/jasder_test/entries.json
分支名称、tag名称或是提交记录id,默认为master分支
-返回字段说明:
+返回字段说明:
参数
@@ -8983,9 +9196,9 @@ http://localhost:3000//api/jasder/jasder_test/entries.json
-d "filepath=file" \
http://localhost:3000//api/jasder/jasder_test/sub_entries.json
await octokit.request('GET /api/jasder/jasder_test/sub_entries.json')
-
HTTP 请求
+HTTP 请求
GET /api/:owner/:repo/sub_entries.json
-请求参数:
+请求参数:
参数
@@ -9024,7 +9237,7 @@ http://localhost:3000//api/jasder/jasder_test/sub_entries.json
分支名称、tag名称或是提交记录id,默认为master分支
-返回字段说明:
+返回字段说明:
参数
@@ -9121,9 +9334,9 @@ http://localhost:3000//api/jasder/jasder_test/sub_entries.json
-d "filepath=lib" \
http://localhost:3000/api/yystopf/csfjkkj/readme.json
await octokit.request('GET /api/yystopf/csfjkkj/readme.json')
-
HTTP 请求
+HTTP 请求
GET /api/:owner/:repo/readme.json
-请求参数:
+请求参数:
参数
@@ -9162,7 +9375,7 @@ http://localhost:3000/api/yystopf/csfjkkj/readme.json
子目录名称,默认为空
-返回字段说明:
+返回字段说明:
参数
@@ -9234,9 +9447,9 @@ http://localhost:3000/api/yystopf/csfjkkj/readme.json
-d "filepath=lib" \
http://localhost:3000/api/yystopf/csfjkkj/contributors.json
await octokit.request('GET /api/yystopf/csfjkkj/contributors.json')
-
HTTP 请求
+HTTP 请求
GET /api/:owner/:repo/contributors.json
-请求参数:
+请求参数:
参数
@@ -9275,7 +9488,7 @@ http://localhost:3000/api/yystopf/csfjkkj/contributors.json
子目录名称,默认为空
-返回字段说明:
+返回字段说明:
参数
@@ -9350,9 +9563,9 @@ http://localhost:3000/api/yystopf/csfjkkj/contributors.json
curl -X GET \
http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
await octokit.request('GET /api/v1/yystopf/ceshi/webhooks.json')
-
HTTP 请求
+HTTP 请求
GET /api/v1/:owner/:repo/webhooks.json
-请求参数:
+请求参数:
参数
@@ -9377,7 +9590,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
项目标识identifier
-返回字段说明:
+返回字段说明:
参数
@@ -9470,9 +9683,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
curl -X GET \
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3.json
await octokit.request('GET /api/v1/yystopf/ceshi/webhooks/3.json')
-
HTTP 请求
+HTTP 请求
GET /api/v1/:owner/:repo/webhooks/:id.json
-请求参数:
+请求参数:
参数
@@ -9504,7 +9717,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3.json
webhook ID
-返回字段说明:
+返回字段说明:
参数
@@ -9627,214 +9840,8 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3.json
curl -X POST \
http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
await octokit.request('POST /api/v1/yystopf/ceshi/webhooks.json')
-
HTTP 请求
-POST /api/v1/:owner/:repo/webhooks.json
-请求参数:
-
-
-参数
-必选
-默认
-类型
-字段说明
-
-
-
-owner
-是
-
-string
-用户登录名
-
-
-repo
-是
-
-string
-项目标识identifier
-
-
-webhook.url
-是
-
-string
-目标url
-
-
-webhook.http_method
-是
-
-string
-http方法, POST和GET
-
-
-webhook.content_type
-是
-
-string
-POST Content Type
-
-
-webhook.secret
-否
-
-string
-密钥文本
-
-
-webhook.active
-是
-
-bool
-是否激活
-
-
-webhook.branch_filter
-否
-
-string
-分支过滤
-
-
-webhook.events
-否
-
-array
-触发事件
-
-
-
-触发事件字段说明
-
-
-
-参数
-含义
-
-
-
-create
-创建分支或标签
-
-
-delete
-分支或标签删除
-
-
-push
-git仓库推送
-
-
-pull_request
-合并请求
-
-
-pull_request_assign
-合并请求被指派
-
-
-pull_request_review_approved
-合并请求被批准
-
-
-pull_request_review_rejected
-合并请求被拒绝
-
-
-
-
-请求的JSON示例:
-
-{
- "active": true,
- "content_type": "json",
- "http_method": "GET",
- "secret": "123456",
- "url": "http://localhost:10000",
- "branch_filter": "*",
- "events": ["push"]
-}
-
返回字段说明:
-
-
-参数
-类型
-字段说明
-
-
-
-id
-int
-id
-
-
-url
-string
-地址
-
-
-content_type
-string
-POST Content Type
-
-
-is_active
-bool
-是否激活
-
-
-type
-string
-类型
-
-
-events
-array
-触发事件
-
-
-create_time
-string
-创建时间
-
-
-
-
-返回的JSON示例:
-
-{
- "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"
-}
-
-
-更新仓库webhook
-更新仓库webhook
-
-
-示例:
-
-curl -X PATCH \
-http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
-
await octokit.request('PATCH /api/v1/yystopf/ceshi/webhooks/7.json')
HTTP 请求
-PATCH /api/v1/:owner/:repo/webhooks/68.json
+POST /api/v1/:owner/:repo/webhooks.json
请求参数:
@@ -9860,13 +9867,6 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
项目标识identifier
-id
-是
-
-string
-webhook id
-
-
webhook.url
是
@@ -9968,6 +9968,219 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
"events": ["push"]
}
返回字段说明:
+
+
+参数
+类型
+字段说明
+
+
+
+id
+int
+id
+
+
+url
+string
+地址
+
+
+content_type
+string
+POST Content Type
+
+
+is_active
+bool
+是否激活
+
+
+type
+string
+类型
+
+
+events
+array
+触发事件
+
+
+create_time
+string
+创建时间
+
+
+
+
+返回的JSON示例:
+
+{
+ "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"
+}
+
+
+更新仓库webhook
+更新仓库webhook
+
+
+示例:
+
+curl -X PATCH \
+http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
+
await octokit.request('PATCH /api/v1/yystopf/ceshi/webhooks/7.json')
+
HTTP 请求
+PATCH /api/v1/:owner/:repo/webhooks/68.json
+请求参数:
+
+
+参数
+必选
+默认
+类型
+字段说明
+
+
+
+owner
+是
+
+string
+用户登录名
+
+
+repo
+是
+
+string
+项目标识identifier
+
+
+id
+是
+
+string
+webhook id
+
+
+webhook.url
+是
+
+string
+目标url
+
+
+webhook.http_method
+是
+
+string
+http方法, POST和GET
+
+
+webhook.content_type
+是
+
+string
+POST Content Type
+
+
+webhook.secret
+否
+
+string
+密钥文本
+
+
+webhook.active
+是
+
+bool
+是否激活
+
+
+webhook.branch_filter
+否
+
+string
+分支过滤
+
+
+webhook.events
+否
+
+array
+触发事件
+
+
+
+触发事件字段说明
+
+
+
+参数
+含义
+
+
+
+create
+创建分支或标签
+
+
+delete
+分支或标签删除
+
+
+push
+git仓库推送
+
+
+pull_request
+合并请求
+
+
+pull_request_assign
+合并请求被指派
+
+
+pull_request_review_approved
+合并请求被批准
+
+
+pull_request_review_rejected
+合并请求被拒绝
+
+
+
+
+请求的JSON示例:
+
+{
+ "active": true,
+ "content_type": "json",
+ "http_method": "GET",
+ "secret": "123456",
+ "url": "http://localhost:10000",
+ "branch_filter": "*",
+ "events": ["push"]
+}
+
返回字段说明:
返回的JSON示例:
@@ -10002,9 +10215,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
curl -X DELETE \
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
await octokit.request('DELETE /api/v1/yystopf/ceshi/webhooks/7.json')
-
HTTP 请求
+HTTP 请求
DELETE /api/v1/:owner/:repo/webhooks/:id.json
-请求参数:
+请求参数:
参数
@@ -10036,7 +10249,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
webhook id
-返回字段说明:
+返回字段说明:
返回的JSON示例:
@@ -10057,9 +10270,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
curl -X GET \
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/hooktasks.json
await octokit.request('GET /api/v1/yystopf/ceshi/webhooks/3/hooktasks.json')
-
HTTP 请求
+HTTP 请求
GET /api/v1/:owner/:repo/webhooks/:id/hooktasks.json
-请求参数:
+请求参数:
参数
@@ -10091,7 +10304,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/hooktasks.json
webhook ID
-返回字段说明:
+返回字段说明:
参数
@@ -10328,9 +10541,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/hooktasks.json
curl -X POST \
http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/tests.json
await octokit.request('POST /api/v1/yystopf/ceshi/webhooks/3/tests.json')
-
HTTP 请求
+HTTP 请求
POST /api/v1/:owner/:repo/webhooks/:id/tests.json
-请求参数:
+请求参数:
参数
@@ -10362,7 +10575,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/tests.json
webhook ID
-返回字段说明:
+返回字段说明:
返回的JSON示例: