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,6 +7889,216 @@ 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 POST http://localhost:3000/api/v1/yystopf/csfjkkj/branches.json
+
await octokit.request('POST /api/v1/yystopf/csfjkkj/branches.json')
+
HTTP 请求
+POST /api/v1/:owner/:repo/branches.json
+请求参数:
+
+
+| 参数 |
+必选 |
+默认 |
+类型 |
+字段说明 |
+
+
+
+| owner |
+是 |
+ |
+string |
+用户登录名 |
+
+
+| repo |
+是 |
+ |
+string |
+项目标识identifier |
+
+
+| new_branch_name |
+是||string |
+新分支名称 |
+ |
+ |
+
+
+| old_branch_name |
+否| |
+string |
+来源分支名称 |
+ |
+
+
+返回字段说明:
+
+
+| 参数 |
+类型 |
+字段说明 |
+
+
+
+| 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"
+}
仓库贡献者列表
仓库贡献者列表
@@ -7894,9 +8107,9 @@ http://localhost:3000/api/ceshi1/ceshi_repo1/applied_transfer_projects/organizat
curl -X GET 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
-请求参数:
+请求参数:
| 参数 |
@@ -7921,7 +8134,7 @@ http://localhost:3000/api/ceshi1/ceshi_repo1/applied_transfer_projects/organizat
项目标识identifier |
-返回字段说明:
+返回字段说明:
| 参数 |
@@ -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,9 +8562,9 @@ 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 请求
+HTTP 请求
POST /api/:owner/:repo/collaborators.json
-请求参数:
+请求参数:
| 参数 |
@@ -8383,7 +8596,7 @@ http://localhost:3000/api/jasder/jasder_test/collaborators.json
用户id |
-返回字段说明:
+返回字段说明:
| 参数 |
@@ -8424,9 +8637,9 @@ http://localhost:3000/api/jasder/jasder_test/collaborators.json
-d "user_id=12" \
http://localhost:3000/api/jasder/jasder_test/collaborators.json
await octokit.request('DELETE /api/jasder/jasder_test/collaborators.json')
-
HTTP 请求
+HTTP 请求
DELETE /api/:owner/:repo/collaborators.json
-请求参数:
+请求参数:
| 参数 |
@@ -8458,7 +8671,7 @@ http://localhost:3000/api/jasder/jasder_test/collaborators.json
用户id |
-返回字段说明:
+返回字段说明:
| 参数 |
@@ -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,9 +9840,9 @@ 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 请求
+HTTP 请求
POST /api/v1/:owner/:repo/webhooks.json
-请求参数:
+请求参数:
| 参数 |
@@ -9754,7 +9967,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
"branch_filter": "*",
"events": ["push"]
}
-返回字段说明:
+返回字段说明:
| 参数 |
@@ -9833,9 +10046,9 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks.json
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 请求
+HTTP 请求
PATCH /api/v1/:owner/:repo/webhooks/68.json
-请求参数:
+请求参数:
| 参数 |
@@ -9967,7 +10180,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/7.json
"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示例: