From 3bda2ba23fc2d49cc2485f810a299da56c1c75ae Mon Sep 17 00:00:00 2001 From: TommyLike Date: Tue, 21 Jul 2026 11:18:35 +0800 Subject: [PATCH 1/2] feat: add GitCode Actions (CI) API support - Updated GitCode OpenAPI spec with 19 new action endpoints (artifact, run, job, runner-group, runner-set, runner management) - Added TagReassign rule for bare repos/{o}/{r} to prevent Users tag pollution from new spec - Added view configs for action/list, action/list-runs, action/list-jobs - Added smoke test scenarios for action artifacts and action runs - Fixed build_test.go to apply builtin normalizer rules in tests New commands: cora gitcode action list # list repo artifacts cora gitcode action list-runs # list workflow runs cora gitcode action list-jobs # list run jobs Co-Authored-By: Claude Opus 4.8 --- assets/openapi/gitcode/openapi.json | 20789 +++++++++++++--------- internal/builder/build_test.go | 31 + internal/registry/builtin.go | 1 + internal/view/builtin.go | 28 + scenarios/gitcode/action-artifacts.yaml | 17 + scenarios/gitcode/action-runs.yaml | 17 + 6 files changed, 12505 insertions(+), 8378 deletions(-) create mode 100644 scenarios/gitcode/action-artifacts.yaml create mode 100644 scenarios/gitcode/action-runs.yaml diff --git a/assets/openapi/gitcode/openapi.json b/assets/openapi/gitcode/openapi.json index 098fd15..8df4735 100644 --- a/assets/openapi/gitcode/openapi.json +++ b/assets/openapi/gitcode/openapi.json @@ -1,5 +1,5 @@ { - "openapi": "3.1.0", + "openapi": "3.0.1", "info": { "title": "默认模块", "description": "", @@ -59,6 +59,9 @@ }, { "name": "Enterprise" + }, + { + "name": "action" } ], "paths": { @@ -106,7 +109,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -248,7 +251,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -924,7 +927,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -1021,7 +1024,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -1101,7 +1104,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -1169,7 +1172,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -1628,7 +1631,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}", "tags": [ - "Repositories" + "Users" ], "parameters": [ { @@ -2718,7 +2721,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -3153,7 +3156,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -3272,7 +3275,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -4209,7 +4212,7 @@ "properties": { "permission": { "type": "string", - "description": "成员权限: 拉代码(pull),推代码(push),管理员(admin)。默认: push, customized(自定义角色)" + "description": "成员权限: 参与者(pull),开发者(push),维护者(admin)。默认: push, customized(自定义角色)" }, "role_id": { "type": "string", @@ -4512,7 +4515,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -4723,7 +4726,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -4789,7 +4792,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -4974,7 +4977,7 @@ "name": "access_token", "in": "query", "description": "", - "required": true, + "required": false, "example": "", "schema": { "type": "string" @@ -5204,11 +5207,7 @@ }, "public": { "type": "integer", - "description": "仓库开源类型。0(私有), 1(外部开源), 2(内部开源),注:与private互斥,以public为主" - }, - "private": { - "type": "boolean", - "description": "仓库公开或私有。默认: 公开(false),注:与public互斥,以public为主。" + "description": "仓库开源类型。0(私有), 1(公开)" }, "auto_init": { "type": "boolean", @@ -5424,7 +5423,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -6086,7 +6085,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -7065,7 +7064,7 @@ "properties": { "permission": { "type": "string", - "description": "成员权限: 拉代码(pull),推代码(push),维护者(admin),customized(自定义角色)。默认: push" + "description": "成员权限: 参与者(pull),开发者(push),维护者(admin),customized(自定义角色)。默认: push" }, "role_id": { "type": "string", @@ -7172,7 +7171,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -11156,7 +11155,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_notifications", "tags": [ - "Repositories" + "Users" ], "parameters": [ { @@ -11348,7 +11347,7 @@ "description": "", "operationId": "put_api_v5_repos_{owner}_{repo}_notifications", "tags": [ - "Repositories" + "Users" ], "parameters": [ { @@ -11583,28 +11582,21 @@ "id": { "type": "integer" }, - "color": { + "name": { "type": "string" }, - "name": { + "color": { "type": "string" }, - "title": { + "created_at": { "type": "string" }, - "repository_id": { - "type": "integer" + "updated_at": { + "type": "string", + "description": "label添加时间" } - }, - "required": [ - "id", - "color", - "name", - "title", - "repository_id" - ] - }, - "description": "标签" + } + } }, "user": { "type": "object", @@ -12407,7 +12399,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -12480,7 +12472,12 @@ "email": { "type": "string" } - } + }, + "required": [ + "name", + "date", + "email" + ] }, "committer": { "type": "object", @@ -12494,12 +12491,22 @@ "email": { "type": "string" } - } + }, + "required": [ + "name", + "date", + "email" + ] }, "message": { "type": "string" } - } + }, + "required": [ + "author", + "committer", + "message" + ] }, "sha": { "type": "string" @@ -12507,10 +12514,16 @@ "url": { "type": "string" } - } + }, + "required": [ + "commit", + "sha", + "url" + ] }, - "protected": { - "type": "integer" + "default_branch": { + "type": "boolean", + "description": "是否默认分支" }, "created_at": { "type": "string", @@ -12519,6 +12532,9 @@ "creator": { "type": "object", "properties": { + "avatar_url": { + "type": "string" + }, "id": { "type": "string" }, @@ -12527,14 +12543,28 @@ }, "name": { "type": "string" - }, - "avatar_url": { - "type": "string" } }, + "required": [ + "avatar_url", + "id", + "login", + "name" + ], "description": "创建人" + }, + "protected": { + "type": "boolean" } - } + }, + "required": [ + "name", + "commit", + "default_branch", + "created_at", + "creator", + "protected" + ] } }, "example": { @@ -12764,7 +12794,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -12802,14 +12832,11 @@ "author_name": { "type": "string" }, - "author_iam_id": { - "type": "null" - }, "author_email": { "type": "string" }, "author_user_name": { - "type": "null" + "type": "string" }, "committed_date": { "type": "string" @@ -12821,16 +12848,7 @@ "type": "string" }, "committer_user_name": { - "type": "null" - }, - "open_gpg_verified": { - "type": "null" - }, - "verification_status": { - "type": "null" - }, - "gpg_primary_key_id": { - "type": "null" + "type": "string" }, "short_id": { "type": "string" @@ -12840,35 +12858,42 @@ }, "title": { "type": "string" - }, - "author_avatar_url": { - "type": "string" - }, - "committer_avatar_url": { - "type": "string" - }, - "relate_url": { - "type": "null" } - } + }, + "required": [ + "id", + "message", + "parent_ids", + "authored_date", + "author_name", + "author_email", + "author_user_name", + "committed_date", + "committer_name", + "committer_email", + "committer_user_name", + "short_id", + "created_at", + "title" + ] }, "merged": { - "type": "integer" + "type": "boolean" }, "protected": { - "type": "integer" + "type": "boolean" }, "developers_can_push": { - "type": "integer" + "type": "boolean" }, "developers_can_merge": { - "type": "integer" + "type": "boolean" }, "can_push": { - "type": "integer" + "type": "boolean" }, "default": { - "type": "integer" + "type": "boolean" }, "created_at": { "type": "string", @@ -12877,6 +12902,9 @@ "creator": { "type": "object", "properties": { + "avatar_url": { + "type": "string" + }, "id": { "type": "string" }, @@ -12885,14 +12913,29 @@ }, "name": { "type": "string" - }, - "avatar_url": { - "type": "string" } }, + "required": [ + "avatar_url", + "id", + "login", + "name" + ], "description": "创建人" } - } + }, + "required": [ + "name", + "commit", + "merged", + "protected", + "developers_can_push", + "developers_can_merge", + "can_push", + "default", + "created_at", + "creator" + ] }, "example": { "name": "dev", @@ -12989,11 +13032,11 @@ }, "pusher": { "type": "string", - "description": "可推送代码成员。develop:仓库管理员和开发者;admin:仓库管理员;maintainer:维护者;多个角色使用英文分号相隔。指定用户传入用户名,多个用户使用英文逗号隔开。空字符串:不允许任何人推送" + "description": "可推送代码成员。develop:仓库管理员和开发者;admin:仓库管理员;maintainer:维护者;多个角色使用英文分号相隔。指定用户传入用户名,多个用户使用英文分号隔开。空字符串:不允许任何人推送" }, "merger": { "type": "string", - "description": "可合并 Pull Request成员。develop:仓库管理员和开发者;admin:仓库管理员;maintainer:维护者;多个角色使用英文分号相隔。指定用户传入用户名,多个用户使用英文逗号隔开。空字符串:不允许任何人合并" + "description": "可合并 Pull Request成员。develop:仓库管理员和开发者;admin:仓库管理员;maintainer:维护者;多个角色使用英文分号相隔。指定用户传入用户名,多个用户使用英文分号隔开。空字符串:不允许任何人合并" } }, "required": [ @@ -13146,11 +13189,11 @@ "properties": { "pusher": { "type": "string", - "description": "可推送代码成员。develop:仓库管理员和开发者;admin:仓库管理员;maintainer:维护者;多个角色使用英文分号相隔。指定用户传入用户名,多个用户使用英文逗号隔开。空字符串:不允许任何人推送" + "description": "可推送代码成员。develop:仓库管理员和开发者;admin:仓库管理员;maintainer:维护者;多个角色使用英文分号相隔。指定用户传入用户名,多个用户使用英文分号隔开。空字符串:不允许任何人推送" }, "merger": { "type": "string", - "description": "可合并 Pull Request成员。develop:仓库管理员和开发者;admin:仓库管理员;maintainer:维护者;多个角色使用英文分号相隔。空字符串:不允许任何人合并" + "description": "可合并 Pull Request成员。develop:仓库管理员和开发者;admin:仓库管理员;maintainer:维护者;多个角色使用英文分号相隔。指定用户传入用户名,多个用户使用英文分号隔开。空字符串:不允许任何人合并" } }, "required": [ @@ -13419,7 +13462,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -13516,24 +13559,48 @@ "author": { "type": "object", "properties": { + "name": { + "type": "string" + }, "date": { "type": "string" }, "email": { "type": "string" + }, + "login": { + "type": "string" } - } + }, + "required": [ + "name", + "date", + "email", + "login" + ] }, "committer": { "type": "object", "properties": { + "name": { + "type": "string" + }, "date": { "type": "string" }, "email": { "type": "string" + }, + "login": { + "type": "string" } - } + }, + "required": [ + "name", + "date", + "email", + "login" + ] }, "tree": { "type": "object", @@ -13544,40 +13611,88 @@ "url": { "type": "string" } - } + }, + "required": [ + "sha", + "url" + ] }, "message": { "type": "string" } - } + }, + "required": [ + "author", + "committer", + "tree", + "message" + ] }, "author": { "type": "object", "properties": { + "name": { + "type": "string" + }, "email": { "type": "string" }, + "id": { + "type": "integer" + }, "login": { "type": "string" }, "type": { "type": "string" + }, + "object_id": { + "type": "string" } - } + }, + "required": [ + "name", + "email", + "id", + "login", + "type", + "object_id" + ] }, "committer": { "type": "object", "properties": { + "name": { + "type": "string" + }, "date": { "type": "string" }, "email": { "type": "string" }, + "id": { + "type": "integer" + }, + "login": { + "type": "string" + }, "type": { "type": "string" + }, + "object_id": { + "type": "string" } - } + }, + "required": [ + "name", + "date", + "email", + "id", + "login", + "type", + "object_id" + ] }, "parents": { "type": "array", @@ -13590,10 +13705,59 @@ "url": { "type": "string" } - } + }, + "required": [ + "sha", + "url" + ] + } + }, + "co_authors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "email": { + "type": "string" + } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "email" + ] } } - } + }, + "required": [ + "url", + "sha", + "html_url", + "comments_url", + "commit", + "author", + "committer", + "parents", + "co_authors" + ] } }, "example": { @@ -13685,7 +13849,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -13735,7 +13899,12 @@ "email": { "type": "string" } - } + }, + "required": [ + "name", + "date", + "email" + ] }, "committer": { "type": "object", @@ -13749,12 +13918,22 @@ "email": { "type": "string" } - } + }, + "required": [ + "name", + "date", + "email" + ] }, "message": { "type": "string" } - } + }, + "required": [ + "author", + "committer", + "message" + ] }, "stats": { "type": "object", @@ -13768,16 +13947,36 @@ "total": { "type": "integer" } - } + }, + "required": [ + "additions", + "deletions", + "total" + ] }, "files": { "type": "array", "items": { "type": "object", "properties": { + "sha": { + "type": "string" + }, "filename": { "type": "string" }, + "status": { + "type": "string" + }, + "additions": { + "type": "integer" + }, + "deletions": { + "type": "integer" + }, + "changes": { + "type": "integer" + }, "raw_url": { "type": "string" }, @@ -13786,8 +13985,67 @@ } } } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "co_authors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "email": { + "type": "string" + } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "email" + ] + } } - } + }, + "required": [ + "url", + "sha", + "html_url", + "comments_url", + "commit", + "stats", + "files", + "parents", + "co_authors" + ] }, "example": { "url": "https://gitcode.com/api/v5/repos/daming_1/zhu_di/commits/7ffc0a0deb709143f6be12a55e218fab9233ca37", @@ -13882,7 +14140,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -14605,268 +14863,268 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "成功响应", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "target": { - "type": "object", - "properties": {} - }, - "updated_at": { - "type": "string" - }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - } - }, - "example": { - "body": "阿福时间看风景", - "created_at": "2024-11-06T09:43:23+08:00", - "id": 1492393, - "target": {}, - "updated_at": "2024-11-06T15:18:04+08:00", - "user": { - "id": 496, - "login": "xiaogang", - "name": "xiaogang", - "type": "User" - } - } - } - }, - "headers": {} - } - }, - "security": [] - }, - "patch": { - "summary": "更新Commit评论", - "deprecated": false, - "description": "", - "operationId": "patch_api_v5_repos_{owner}_{repo}_comments_{id}", - "tags": [ - "Commit" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "id", - "in": "path", - "description": "评论id", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "评论内容" - } - }, - "required": [ - "body" - ] - }, - "example": "" - } - } - }, - "responses": { - "200": { - "description": "成功响应", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "target": { - "type": "object", - "properties": {} - }, - "updated_at": { - "type": "string" - }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - } - }, - "example": { - "body": "", - "created_at": "2024-11-06T09:43:23+08:00", - "id": 1492393, - "target": {}, - "updated_at": "2024-11-14T18:44:53+08:00", - "user": { - "id": 496, - "login": "xiaogang", - "name": "xiaogang", - "type": "User" - } - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/api/v5/repos/{owner}/{repo}/comments": { - "get": { - "summary": "获取仓库的Commit评论", - "deprecated": false, - "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_comments", - "tags": [ - "Commit" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "当前的页码", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "per_page", - "in": "query", - "description": "每页的数量,最大为 100,默认 20", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "order", - "in": "query", - "description": "排序顺序: asc(default),desc", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "target": { + "type": "object", + "properties": {} + }, + "updated_at": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + }, + "example": { + "body": "阿福时间看风景", + "created_at": "2024-11-06T09:43:23+08:00", + "id": 1492393, + "target": {}, + "updated_at": "2024-11-06T15:18:04+08:00", + "user": { + "id": 496, + "login": "xiaogang", + "name": "xiaogang", + "type": "User" + } + } + } + }, + "headers": {} + } + }, + "security": [] + }, + "patch": { + "summary": "更新Commit评论", + "deprecated": false, + "description": "", + "operationId": "patch_api_v5_repos_{owner}_{repo}_comments_{id}", + "tags": [ + "Commit" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "评论id", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "评论内容" + } + }, + "required": [ + "body" + ] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "target": { + "type": "object", + "properties": {} + }, + "updated_at": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + }, + "example": { + "body": "", + "created_at": "2024-11-06T09:43:23+08:00", + "id": 1492393, + "target": {}, + "updated_at": "2024-11-14T18:44:53+08:00", + "user": { + "id": 496, + "login": "xiaogang", + "name": "xiaogang", + "type": "User" + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/repos/{owner}/{repo}/comments": { + "get": { + "summary": "获取仓库的Commit评论", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_comments", + "tags": [ + "Commit" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前的页码", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的数量,最大为 100,默认 20", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "order", + "in": "query", + "description": "排序顺序: asc(default),desc", "required": false, "schema": { "type": "string" @@ -14971,7 +15229,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -15154,7 +15412,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -15284,7 +15542,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -15351,7 +15609,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -15408,7 +15666,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -16357,6 +16615,13 @@ }, "color": { "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string", + "description": "label添加时间" } } } @@ -16546,11 +16811,11 @@ }, "status": { "type": "string", - "description": "issue状态(企业版支持)" + "description": "issue状态(企业版支持),与类型不能同时设置" }, "issue_severity": { "type": "string", - "description": "issue优先级(企业版支持)" + "description": "issue优先级(企业版支持),与类型不能同时设置" }, "custom_fields": { "type": "array", @@ -16571,15 +16836,27 @@ } }, "description": "自定义字段信息(企业版支持)" + }, + "issue_type": { + "type": "string", + "description": "issue类型(企业版支持),与状态和优先级不能同时设置" } }, "required": [ "repo", - "title", - "issue_severity" + "title" ] }, - "example": "{\n \"repo\":\"test666\",\n \"title\":\"fsds11\",\n \"body\":\"new body\",\n \"state\":\"closed\",\n \"assignee\":\"aron1\",\n \"milestone\":\"0706\",\n \"labels\":\"new label\",\n // \"security_hole\":\"\",\n \"status\":\"拒绝\"\n}" + "example": { + "repo": "test666", + "title": "fsds11", + "body": "new body", + "state": "closed", + "assignee": "aron1", + "milestone": "0706", + "labels": "new label", + "status": "拒绝" + } } } }, @@ -16941,7 +17218,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -17066,13 +17343,15 @@ }, "color": { "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string", + "description": "label添加时间" } - }, - "required": [ - "id", - "name", - "color" - ] + } } }, "issue_state": { @@ -17334,7 +17613,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -17605,13 +17884,15 @@ }, "color": { "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string", + "description": "label添加时间" } - }, - "required": [ - "id", - "name", - "color" - ] + } } }, "issue_state": { @@ -18009,7 +18290,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -18198,7 +18479,7 @@ "summary": "创建Issue评论", "deprecated": false, "description": "", - "operationId": "createIssueComment", + "operationId": "post_api_v5_repos_{owner}_{repo}_issues_{number}_comments", "tags": [ "Issues" ], @@ -18408,7 +18689,7 @@ "summary": "获取仓库所有 Issue 评论", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_issues_comments", + "operationId": "get_api_v5_repos_{owner}_{repo}_issues_comments ", "tags": [ "Issues" ], @@ -18437,7 +18718,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -18445,7 +18726,7 @@ { "name": "sort", "in": "query", - "description": "Either created or updated. Default: created", + "description": "按照字段排序,支持created或者updated。默认: created", "required": false, "schema": { "type": "string" @@ -18454,7 +18735,7 @@ { "name": "direction", "in": "query", - "description": "Either asc or desc. Ignored without the sort parameter.", + "description": "排序方向,支持asc/desc", "required": false, "schema": { "type": "string" @@ -18463,7 +18744,7 @@ { "name": "since", "in": "query", - "description": "Only comments updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", + "description": "只会返回在此时间或之后更新的评论。例如:2024-11-20T13:00:21+08:00(注意+号要url编码为%2B)", "required": false, "schema": { "type": "string" @@ -18676,7 +18957,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -19278,7 +19559,7 @@ "security": [] } }, - "/api/v5/repos/{owner}/issues/{number}/operate_logs": { + "/api/v5/repos/{owner}/{repo}/issues/{number}/operate_logs": { "get": { "summary": "获取某个issue下的操作日志", "deprecated": false, @@ -19293,35 +19574,33 @@ "in": "path", "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "number", + "name": "repo", "in": "path", - "description": "issue编号", + "description": "仓库路径(path)", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "access_token", - "in": "query", - "description": "用户授权码", + "name": "number", + "in": "path", + "description": "issue编号", "required": true, "schema": { "type": "string" } }, { - "name": "repo", + "name": "access_token", "in": "query", - "description": "仓库路径(path)", - "required": true, + "description": "用户授权码", + "required": false, "schema": { "type": "string" } @@ -19604,7 +19883,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -19857,13 +20136,15 @@ }, "color": { "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string", + "description": "label添加时间" } - }, - "required": [ - "id", - "name", - "color" - ] + } } }, "issue_state": { @@ -20395,13 +20676,15 @@ }, "color": { "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string", + "description": "label添加时间" } - }, - "required": [ - "id", - "name", - "color" - ] + } } }, "comments": { @@ -20706,7 +20989,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -21277,7 +21560,7 @@ "in": "path", "description": "issue 全局唯一 id", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -21286,7 +21569,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -21423,7 +21706,7 @@ "in": "path", "description": "issue 全局唯一 id", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -21432,7 +21715,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -21547,7 +21830,25 @@ "labels": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string", + "description": "label添加时间" + } + } } }, "issue_state": { @@ -21914,7 +22215,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -22073,150 +22374,150 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "当前页码", "required": false, "schema": { "type": "string" } }, - { - "name": "per_page", - "in": "query", - "description": "每页数量", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "emoji_name", - "in": "query", - "description": "emoji表情,可选:like,dislike,smile,confused,love,rocket,eyes,party", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "emoji": { - "type": "string", - "title": "emoji表情" - }, - "emoji_name": { - "type": "string", - "title": "emoji表情枚举值" - }, - "user": { - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "object_id": { - "type": "string" - } - }, - "required": [ - "login", - "name", - "avatar_url", - "object_id" - ], - "title": "用户信息" - } - }, - "required": [ - "id", - "emoji", - "emoji_name", - "user" - ] - } - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/api/v5/repos/{owner}/{repo}/issues/comment/{comment_id}/user_reactions": { - "get": { - "summary": "获取issue评论的表态列表", - "deprecated": false, - "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_issues_comment_{comment_id}_user_reactions", - "tags": [ - "Issues" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "comment_id", - "in": "path", - "description": "评论的id", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页数量", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "emoji_name", + "in": "query", + "description": "emoji表情,可选:like,dislike,smile,confused,love,rocket,eyes,party", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "emoji": { + "type": "string", + "title": "emoji表情" + }, + "emoji_name": { + "type": "string", + "title": "emoji表情枚举值" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": [ + "login", + "name", + "avatar_url", + "object_id" + ], + "title": "用户信息" + } + }, + "required": [ + "id", + "emoji", + "emoji_name", + "user" + ] + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/repos/{owner}/{repo}/issues/comment/{comment_id}/user_reactions": { + "get": { + "summary": "获取issue评论的表态列表", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_issues_comment_{comment_id}_user_reactions", + "tags": [ + "Issues" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "in": "path", + "description": "评论的id", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "page", "in": "query", @@ -22351,7 +22652,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -22502,7 +22803,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -22643,7 +22944,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -22767,20 +23068,18 @@ "name": { "description": "标签名称", "type": "string", - "examples": [ - "" - ], "example": "" }, "color": { "description": "标签新颜色.如#fff", "type": "string", - "examples": [ - "" - ], "example": "" } } + }, + "example": { + "name": "", + "color": "" } } } @@ -22908,7 +23207,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -22999,7 +23298,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -23247,6 +23546,330 @@ "security": [] } }, + "/api/v5/repos/{owner}/{repo}/pulls/{number}/testers": { + "delete": { + "summary": "取消用户测试Pull Request", + "deprecated": false, + "description": "", + "operationId": "delete_api_v5_repos_{owner}_{repo}_pulls_{number}_testers", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "number", + "in": "path", + "description": "第几个PR,即本仓库PR的序数。对应iid", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "testers": { + "type": "string", + "description": "用户的个人空间地址, 以逗号分隔" + } + }, + "required": [ + "testers" + ] + }, + "example": { + "testers": "user1,user2" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "login": { + "type": "string", + "title": "账号" + }, + "name": { + "type": "string", + "title": "昵称" + }, + "avatar_url": { + "type": "string", + "title": "头像" + }, + "object_id": { + "type": "string", + "title": "id" + } + }, + "required": [ + "id", + "login", + "name", + "object_id" + ] + } + } + } + }, + "headers": {} + } + }, + "security": [] + }, + "patch": { + "summary": "重置 Pull Request测试 的状态", + "deprecated": false, + "description": "", + "operationId": "patch_api_v5_repos_{owner}_{repo}_pulls_{number}_testers", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "number", + "in": "path", + "description": "第几个PR,即本仓库PR的序数", + "required": true, + "example": "", + "schema": { + "type": "integer" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "reset_all": { + "type": "boolean", + "description": "是否重置所有测试人,默认:false,只对管理员生效" + } + } + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + }, + "post": { + "summary": "指派用户测试 Pull Request", + "deprecated": false, + "description": "", + "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_testers", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "number", + "in": "path", + "description": "第几个PR,即本仓库PR的序数", + "required": true, + "example": "", + "schema": { + "type": "integer" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "testers": { + "type": "string", + "description": "用户的个人空间地址, 以逗号分隔" + }, + "add": { + "type": "boolean", + "description": "是否新增测试人,为true会新增测试人,false则为覆盖更新测试人,默认false" + } + }, + "required": [ + "testers" + ] + }, + "example": { + "testers": "user1", + "add": "true" + } + } + } + }, + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + } + } + } + }, + "examples": { + "1": { + "summary": "成功示例", + "value": { + "id": 43, + "login": "green", + "name": "green", + "avatar_url": "https://gitcode-img.obs.cn-south-1.myhuaweicloud.com:443/be/fb/7b9e393fbd80ca315dec249f2be6e6a7378f591609b6525798bc6d95abedc992.png?time=1712128581171" + } + }, + "2": { + "summary": "成功示例", + "value": { + "id": 452, + "login": "zhanghq2", + "name": "zhanghq2" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, "/api/v5/repos/{owner}/{repo}/pulls": { "get": { "summary": "获取项目Pull Request列表", @@ -23254,7 +23877,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -23281,7 +23904,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -23494,26 +24117,20 @@ "id": { "type": "integer" }, - "color": { + "name": { "type": "string" }, - "name": { + "color": { "type": "string" }, - "title": { + "created_at": { "type": "string" }, - "repository_id": { - "type": "integer" + "updated_at": { + "type": "string", + "description": "label添加时间" } - }, - "required": [ - "id", - "color", - "name", - "title", - "repository_id" - ] + } } }, "user": { @@ -24036,7 +24653,8 @@ "type": "string" }, "can_merge_check": { - "type": "boolean" + "type": "boolean", + "description": "该字段已废弃,如果需要请调用pull request详情接口" }, "mergeable": { "type": "boolean" @@ -24191,7 +24809,7 @@ "description": "", "operationId": "post_api_v5_repos_{owner}_{repo}_pulls", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -24451,23 +25069,21 @@ "items": { "type": "object", "properties": { - "color": { - "type": "string" - }, - "name": { - "type": "string" - }, "id": { "type": "integer" }, - "title": { + "name": { "type": "string" }, - "type": { - "type": "null" + "color": { + "type": "string" }, - "textColor": { + "created_at": { "type": "string" + }, + "updated_at": { + "type": "string", + "description": "label添加时间" } } } @@ -25780,7 +26396,7 @@ "description": "", "operationId": "put_api_v5_repos_{owner}_{repo}_pulls_{number}_merge", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -25808,7 +26424,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -25831,7 +26447,7 @@ "properties": { "merge_method": { "type": "string", - "description": "可选。合并PR的方法,merge(合并所有提交)、squash(扁平化分支合并)和rebase(变基并合并)。默认为merge。" + "description": "可选。合并PR的方法,merge(合并所有提交)、rebase(变基并合入)。默认为merge。" }, "title": { "type": "string", @@ -25840,6 +26456,18 @@ "description": { "type": "string", "description": "可选。合并描述" + }, + "force_merge": { + "type": "boolean", + "description": "是否强制合并(需开启“允许管理员强制合入”设置,并且需管理员权限)" + }, + "squash": { + "type": "boolean", + "description": "是否squash合并,默认false" + }, + "squash_commit_message": { + "type": "string", + "description": "squash合并的相关备注信息" } } }, @@ -25884,7 +26512,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_merge", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -25912,7 +26540,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -25921,7 +26549,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -25958,7 +26586,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_issues", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -25986,7 +26614,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -25995,7 +26623,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -26063,23 +26691,21 @@ "items": { "type": "object", "properties": { - "color": { - "type": "string" - }, - "name": { - "type": "string" - }, "id": { "type": "integer" }, - "title": { + "name": { "type": "string" }, - "type": { - "type": "null" + "color": { + "type": "string" }, - "textColor": { + "created_at": { "type": "string" + }, + "updated_at": { + "type": "string", + "description": "label添加时间" } } } @@ -26138,7 +26764,7 @@ "description": "", "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_linked_issues", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -26269,7 +26895,7 @@ "description": "", "operationId": "delete_api_v5_repos_{owner}_{repo}_pulls_{number}_issues", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -26402,7 +27028,7 @@ "description": "", "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_comments", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -26430,7 +27056,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -26462,6 +27088,10 @@ "position": { "type": "integer", "description": "代码所在行数" + }, + "position_type": { + "type": "string", + "description": "\"binary\":文件级评论,\"text\":代码行评论。默认为\"text\",传了\"binary\"时position不再生效。" } }, "required": [ @@ -26505,7 +27135,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_comments", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -26533,7 +27163,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -26542,7 +27172,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -26660,6 +27290,10 @@ }, "end_old_line": { "type": "integer" + }, + "position_type": { + "type": "string", + "description": "\"binary\":文件级评论,\"text\":代码行评论。" } } }, @@ -26746,7 +27380,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_files", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -26774,7 +27408,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -26783,7 +27417,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -26987,7 +27621,7 @@ "description": "", "operationId": "patch_api_v5_repos_{owner}_{repo}_pulls_{number}", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -27015,7 +27649,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -27063,6 +27697,14 @@ "close_related_issue": { "type": "boolean", "description": "可选,合并后是否关闭关联的 Issue,默认根据仓库配置设置" + }, + "prune_branch": { + "type": "boolean", + "description": "合并后删除源分支" + }, + "squash_merge": { + "type": "boolean", + "description": "squash合并" } } }, @@ -27115,7 +27757,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -27143,7 +27785,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -27152,7 +27794,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -27366,7 +28008,7 @@ }, "prune_branch": { "type": "boolean", - "description": "是否强制删除源分支" + "description": "合并后删除源分支" }, "mergeable": { "type": "boolean", @@ -27800,6 +28442,10 @@ "close_related_issue": { "type": "boolean", "description": "合并时是否关闭关联的issue" + }, + "squash_merge": { + "type": "boolean", + "description": "Squash 合并" } }, "required": [ @@ -27829,7 +28475,8 @@ "base", "mergeable_state", "milestone", - "merged_by" + "merged_by", + "squash_merge" ] }, "example": { @@ -27963,7 +28610,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_commits", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -27991,7 +28638,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -28000,7 +28647,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -28058,7 +28705,12 @@ "date": { "type": "string" } - } + }, + "required": [ + "name", + "email", + "date" + ] }, "committer": { "type": "object", @@ -28072,12 +28724,21 @@ "email": { "type": "string" } - } + }, + "required": [ + "name", + "email" + ] }, "message": { "type": "string" } - } + }, + "required": [ + "author", + "committer", + "message" + ] }, "author": { "type": "object", @@ -28096,8 +28757,19 @@ }, "html_url": { "type": "string" + }, + "object_id": { + "type": "string" } - } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "object_id" + ] }, "committer": { "type": "object", @@ -28116,8 +28788,19 @@ }, "html_url": { "type": "string" + }, + "object_id": { + "type": "string" } - } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "object_id" + ] }, "parents": { "type": "object", @@ -28131,9 +28814,56 @@ "type": "string" } } + }, + "required": [ + "sha", + "shas" + ] + }, + "co_authors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "email": { + "type": "string" + } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "email" + ] } } - } + }, + "required": [ + "sha", + "html_url", + "commit", + "author", + "committer", + "parents", + "co_authors" + ] } }, "example": { @@ -28189,7 +28919,7 @@ "description": "", "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_labels", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -28217,7 +28947,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -28298,7 +29028,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_labels", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -28326,7 +29056,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -28335,7 +29065,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -28419,7 +29149,7 @@ "description": "", "operationId": "put_api_v5_repos_{owner}_{repo}_pulls_{number}_labels", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -28447,7 +29177,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -28493,97 +29223,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/pulls/{number}/labels/{name}": { - "delete": { - "summary": "删除 Pull Request标签", - "deprecated": false, - "description": "", - "operationId": "delete_api_v5_repos_{owner}_{repo}_pulls_{number}_labels_{name}", - "tags": [ - "Pulls" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "number", - "in": "path", - "description": "第几个PR,即本仓库PR的序数", - "required": true, - "example": 0, - "schema": { - "type": "integer" - } - }, - { - "name": "name", - "in": "path", - "description": "标签名称(批量删除用英文逗号分隔,如: bug,feature)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/api/v5/repos/{owner}/{repo}/pulls/{number}/test": { + "/api/v5/repos/{owner}/{repo}/pulls/{number}/discussions/{discussion_id}/comments": { "post": { - "summary": "处理 Pull Request测试", + "summary": "回复Pull Request评论", "deprecated": false, "description": "", - "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_test", + "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_discussions_{discussions_id}_comments", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(组织或个人的地址path)", + "description": "仓库所属空间地址(组织或个人的地址path)\n\n", "required": true, "example": "", "schema": { @@ -28605,7 +29258,295 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_id", + "in": "path", + "description": "讨论id", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "example": "", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string" + } + }, + "required": [ + "body" + ] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "讨论id" + }, + "noteId": { + "type": "integer", + "description": "评论id" + }, + "body": { + "type": "string" + } + }, + "required": [ + "id", + "body", + "noteId" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/repos/{owner}/{repo}/pulls/{number}/labels/{name}": { + "delete": { + "summary": "删除 Pull Request标签", + "deprecated": false, + "description": "", + "operationId": "delete_api_v5_repos_{owner}_{repo}_pulls_{number}_labels_{name}", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "number", + "in": "path", + "description": "第几个PR,即本仓库PR的序数", + "required": true, + "example": "", + "schema": { + "type": "integer" + } + }, + { + "name": "name", + "in": "path", + "description": "标签名称(批量删除用英文逗号分隔,如: bug,feature)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/repos/{owner}/{repo}/pulls/{number}/comments/{discussion_id}": { + "put": { + "summary": "修改检视意见解决状态", + "deprecated": false, + "description": "", + "operationId": "put_api_v5_repos_{owner}_{repo}_pulls_{number}_comments_{discussions_id}", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "number", + "in": "path", + "description": "第几个PR,即本仓库PR的序数。对应iid", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "discussion_id", + "in": "path", + "description": "讨论的ID(字符串类型 id) ", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resolved": { + "type": "boolean", + "description": "是否已解决" + } + }, + "required": [ + "resolved" + ] + }, + "example": { + "resolved": true + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/repos/{owner}/{repo}/pulls/{number}/test": { + "post": { + "summary": "处理 Pull Request测试", + "deprecated": false, + "description": "", + "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_test", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "number", + "in": "path", + "description": "第几个PR,即本仓库PR的序数", + "required": true, + "example": "", "schema": { "type": "integer" } @@ -28660,7 +29601,7 @@ "description": "", "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_review", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -28688,7 +29629,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -28711,7 +29652,7 @@ "properties": { "force": { "type": "boolean", - "description": "是否强制测试通过(默认否),只对管理员生效" + "description": "是否强制审查通过(默认否),只对管理员生效" } } }, @@ -28743,7 +29684,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_operate_logs", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -28780,7 +29721,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -28975,20 +29916,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/pulls/{number}/testers": { - "patch": { - "summary": "重置 Pull Request测试 的状态", + "/api/v5/repos/{owner}/{repo}/pulls/{number}/reviewers": { + "post": { + "summary": "指派用户评审Pull Request", "deprecated": false, "description": "", - "operationId": "patch_api_v5_repos_{owner}_{repo}_pulls_{number}_testers", + "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_approval_reviewers", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(组织或个人的地址path)", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -29008,94 +29949,13 @@ { "name": "number", "in": "path", - "description": "第几个PR,即本仓库PR的序数", - "required": true, - "example": 0, - "schema": { - "type": "integer" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "reset_all": { - "type": "boolean", - "description": "是否重置所有测试人,默认:false,只对管理员生效" - } - } - }, - "example": "" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - }, - "headers": {} - } - }, - "security": [] - }, - "post": { - "summary": "指派用户测试 Pull Request", - "deprecated": false, - "description": "", - "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_testers", - "tags": [ - "Pulls" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", + "description": "第几个PR,即本仓库PR的序数。对应iid", "required": true, "example": "", "schema": { "type": "string" } }, - { - "name": "number", - "in": "path", - "description": "第几个PR,即本仓库PR的序数", - "required": true, - "example": 0, - "schema": { - "type": "integer" - } - }, { "name": "access_token", "in": "query", @@ -29112,21 +29972,22 @@ "schema": { "type": "object", "properties": { - "testers": { + "reviewers": { "type": "string", "description": "用户的个人空间地址, 以逗号分隔" }, "add": { "type": "boolean", - "description": "是否新增测试人,为true会新增测试人,false则为覆盖更新测试人,默认false" + "description": "是否新增评审人,为true会新增评审人,false会覆盖更新评审人,默认false" } }, + "description": "用户名列表", "required": [ - "testers" + "reviewers" ] }, "example": { - "testers": "user1", + "reviewers": "user1", "add": "true" } } @@ -29134,7 +29995,7 @@ }, "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { @@ -29146,34 +30007,28 @@ "type": "integer" }, "login": { - "type": "string" + "type": "string", + "title": "账号" }, "name": { - "type": "string" + "type": "string", + "title": "昵称" }, "avatar_url": { - "type": "string" + "type": "string", + "title": "头像" + }, + "object_id": { + "type": "string", + "title": "id" } - } - } - }, - "examples": { - "1": { - "summary": "成功示例", - "value": { - "id": 43, - "login": "green", - "name": "green", - "avatar_url": "https://gitcode-img.obs.cn-south-1.myhuaweicloud.com:443/be/fb/7b9e393fbd80ca315dec249f2be6e6a7378f591609b6525798bc6d95abedc992.png?time=1712128581171" - } - }, - "2": { - "summary": "成功示例", - "value": { - "id": 452, - "login": "zhanghq2", - "name": "zhanghq2" - } + }, + "required": [ + "id", + "login", + "name", + "object_id" + ] } } } @@ -29184,12 +30039,12 @@ "security": [] }, "delete": { - "summary": "取消用户测试Pull Request", + "summary": "取消用户评审Pull Request", "deprecated": false, "description": "", - "operationId": "delete_api_v5_repos_{owner}_{repo}_pulls_{number}_testers", + "operationId": "delete_api_v5_repos_{owner}_{repo}_pulls_{number}_approval_reviewers", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -29238,13 +30093,13 @@ "schema": { "type": "object", "properties": { - "testers": { + "reviewers": { "type": "string", "description": "用户的个人空间地址, 以逗号分隔" } }, "required": [ - "testers" + "reviewers" ] }, "example": { @@ -29306,7 +30161,7 @@ "description": "", "operationId": "patch_api_v5_repos_{owner}_{repo}_pulls_{number}_assignees", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -29334,7 +30189,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -29387,7 +30242,7 @@ "description": "", "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_assignees", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -29415,7 +30270,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -29478,7 +30333,7 @@ "description": "", "operationId": "delete_api_v5_repos_{owner}_{repo}_pulls_{number}_assignees", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -29506,7 +30361,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -29548,6 +30403,188 @@ "security": [] } }, + "/api/v5/repos/{owner}/{repo}/pulls/{number}/option_reviewers": { + "get": { + "summary": "获取可作为Pull Request评审人列表", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_option_approval_reviewers", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "number", + "in": "path", + "description": "第几个PR,即本仓库PR的序数。对应iid", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "login": { + "type": "string", + "title": "账号" + }, + "name": { + "type": "string", + "title": "昵称" + }, + "avatar_url": { + "type": "string", + "title": "头像" + }, + "object_id": { + "type": "string", + "title": "id" + } + }, + "required": [ + "id", + "login", + "name", + "object_id" + ] + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/repos/{owner}/{repo}/pulls/option_testers": { + "get": { + "summary": "获取可作为Pull Request测试人列表", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_option_approval_testers", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "login": { + "type": "string", + "title": "账号" + }, + "name": { + "type": "string", + "title": "昵称" + }, + "avatar_url": { + "type": "string", + "title": "头像" + }, + "object_id": { + "type": "string", + "title": "id" + } + }, + "required": [ + "id", + "login", + "name", + "object_id" + ] + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, "/api/v5/repos/{owner}/{repo}/pulls/{number}/files.json": { "get": { "summary": "pr提交的文件变更信息", @@ -29555,7 +30592,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_files.json", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -29583,7 +30620,7 @@ "in": "path", "description": "第几个PR,即本仓库PR的序数", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -29592,7 +30629,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -29978,7 +31015,7 @@ "description": "", "operationId": "get_{owner}_{repo}_raw_{head_sha}_{name}", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -30047,7 +31084,7 @@ "description": "", "operationId": "get_api_v5_enterprises_{enterprise}_pull_requests", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -30064,7 +31101,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -30194,6 +31231,15 @@ "schema": { "type": "string" } + }, + { + "name": "scope", + "in": "query", + "description": "可选。all,所有;created_by_me,我创建的;assigned_to_me,分配给我的;need_my_approve,需要我审查的;need_my_review,需要我评审的。", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -30482,6 +31528,145 @@ "security": [] } }, + "/api/v5/repos/{owner}/{repo}/pulls/{number}/user_reactions": { + "get": { + "summary": "获取Pull Request的表态列表", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_user_reactions", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "number", + "in": "path", + "description": "Pull Request 编号(区分大小写,无需添加 # 号)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页数量", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "emoji_name", + "in": "query", + "description": "emoji表情,可选:like,dislike,smile,confused,love,rocket,eyes,party", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "emoji": { + "type": "string", + "title": "emoji表情" + }, + "emoji_name": { + "type": "string", + "title": "emoji表情枚举值" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": [ + "login", + "name", + "avatar_url", + "object_id" + ], + "title": "用户信息" + } + }, + "required": [ + "id", + "emoji", + "emoji_name", + "user" + ] + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, "/api/v5/repos/{owner}/{repo}/pulls/comments/{id}": { "get": { "summary": "获取Pull Request某条评论", @@ -30489,7 +31674,7 @@ "description": "", "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_comments_{id}", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -30526,7 +31711,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -30620,7 +31805,7 @@ }, "position_type": { "type": "string", - "description": "位置类型" + "description": "位置类型,\"binary\":文件级评论,\"text\":代码行评论。" }, "old_line": { "type": "integer", @@ -30675,7 +31860,7 @@ "description": "", "operationId": "patch_api_v5_repos_{owner}_{repo}_pulls_comments_{id}", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -30703,7 +31888,7 @@ "in": "path", "description": "评论的ID", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -30760,7 +31945,7 @@ "description": "", "operationId": "delete_api_v5_repos_{owner}_{repo}_pulls_comments_{id}", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -30788,7 +31973,7 @@ "in": "path", "description": "评论的ID", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -30821,6 +32006,447 @@ "security": [] } }, + "/api/v5/repos/{owner}/{repo}/pulls/comment/{comment_id}/user_reactions": { + "get": { + "summary": "获取Pull Request评论的表态列表", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_comment_{comment_id}_user_reactions", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "in": "path", + "description": "评论的id", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页数量", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "emoji_name", + "in": "query", + "description": "emoji表情,可选:like,dislike,smile,confused,love,rocket,eyes,party", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "emoji": { + "type": "string", + "title": "emoji表情" + }, + "emoji_name": { + "type": "string", + "title": "emoji表情枚举值" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": [ + "login", + "name", + "avatar_url", + "object_id" + ], + "title": "用户信息" + } + }, + "required": [ + "id", + "emoji", + "emoji_name", + "user" + ] + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/repos/{owner}/{repo}/pulls/{number}/modify_history": { + "get": { + "summary": "获取Pull Request的修改历史", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_modify_history", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "number", + "in": "path", + "description": "Pull Request 编号(区分大小写,无需添加 # 号)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string", + "title": "创建时间" + }, + "updated_at": { + "type": "string", + "title": "修改时间" + }, + "deleted": { + "type": "boolean", + "title": "是否已删除" + }, + "created": { + "type": "boolean", + "title": "是否是创建" + }, + "content": { + "type": "string", + "title": "修改后的内容" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": [ + "login", + "name", + "avatar_url", + "object_id" + ], + "title": "用户信息" + }, + "updated_user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": [ + "login", + "name", + "avatar_url", + "object_id" + ] + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "deleted", + "created", + "content", + "user", + "updated_user" + ] + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/repos/{owner}/{repo}/pulls/comment/{comment_id}/modify_history": { + "get": { + "summary": "获取Pull Request评论的修改历史", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_comment_{comment_id}_modify_history", + "tags": [ + "Pull Requests" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "in": "path", + "description": "评论的id", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string", + "title": "创建时间" + }, + "updated_at": { + "type": "string", + "title": "修改时间" + }, + "deleted": { + "type": "boolean", + "title": "是否已删除" + }, + "created": { + "type": "boolean", + "title": "是否是创建" + }, + "content": { + "type": "string", + "title": "修改后的内容" + }, + "user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": [ + "login", + "name", + "avatar_url", + "object_id" + ], + "title": "用户信息" + }, + "updated_user": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": [ + "login", + "name", + "avatar_url", + "object_id" + ] + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "deleted", + "created", + "content", + "user", + "updated_user" + ] + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, "/api/v5/org/{org}/pull_requests": { "get": { "summary": "组织 Pull Request列表", @@ -30828,7 +32454,7 @@ "description": "", "operationId": "get_api_v5_org_{org}_pull_requests", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -30845,7 +32471,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "example": "", "schema": { "type": "string" @@ -30969,6 +32595,15 @@ "schema": { "type": "string" } + }, + { + "name": "scope", + "in": "query", + "description": "可选。all,所有;created_by_me,我创建的;assigned_to_me,分配给我的;need_my_approve,需要我审查的;need_my_review,需要我评审的。", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -31121,6 +32756,30 @@ "html_url" ], "description": "合并人" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string", + "description": "label添加时间" + } + } + } } } } @@ -31178,7 +32837,7 @@ "description": "", "operationId": "get_api_v5_enterprises_{enterprise}_issues_{number}_pull_requests", "tags": [ - "Pulls" + "Pull Requests" ], "parameters": [ { @@ -31196,7 +32855,7 @@ "in": "path", "description": "issue 全局 id", "required": true, - "example": 0, + "example": "", "schema": { "type": "integer" } @@ -31205,7 +32864,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -31802,20 +33461,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/pulls/{number}/discussions/{discussion_id}/comments": { - "post": { - "summary": "回复Pull Request评论", + "/api/v5/repos/{owner}/{repo}/milestones": { + "get": { + "summary": "获取仓库所有里程碑", "deprecated": false, "description": "", - "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_discussions_{discussions_id}_comments", + "operationId": "get_api_v5_repos_{owner}_{repo}_milestones", "tags": [ - "Pulls" + "Milestone" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(组织或个人的地址path)\n\n", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -31833,79 +33492,118 @@ } }, { - "name": "number", - "in": "path", - "description": "第几个PR,即本仓库PR的序数", - "required": true, - "example": 0, + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, "schema": { - "type": "integer" + "type": "string" } }, { - "name": "discussion_id", - "in": "path", - "description": "讨论id", - "required": true, - "example": "", + "name": "state", + "in": "query", + "description": "里程碑状态: open, closed, all。默认: open", + "required": false, "schema": { "type": "string" } }, { - "name": "access_token", + "name": "sort", "in": "query", - "description": "用户授权码", + "description": "排序方式: due_on", "required": false, - "example": "", "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string" - } - }, - "required": [ - "body" - ] - }, - "example": "" + }, + { + "name": "direction", + "in": "query", + "description": "升序(asc)或是降序(desc)。默认: asc", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前的页码", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的数量,最大为 100,默认 20", + "required": false, + "schema": { + "type": "integer" } } - }, + ], "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "讨论id" - }, - "noteId": { - "type": "integer", - "description": "评论id" - }, - "body": { - "type": "string" + "type": "array", + "items": { + "type": "object", + "properties": { + "closed_issues": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "due_on": { + "type": "string" + }, + "number": { + "type": "integer" + }, + "open_issues": { + "type": "integer" + }, + "repository_id": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + } } - }, - "required": [ - "id", - "body", - "noteId" - ] + } + }, + "example": { + "closed_issues": 0, + "created_at": "2024-10-08T10:58:16+08:00", + "description": "你好中国", + "due_on": "2024-11-08", + "number": 4914, + "open_issues": 0, + "repository_id": 4066481, + "state": "active", + "title": "你好中国", + "updated_at": "2024-10-08T10:58:16+08:00", + "url": "https://gitcode.com/dengmengmian/oneapi/milestones/1" } } }, @@ -31913,22 +33611,20 @@ } }, "security": [] - } - }, - "/api/v5/repos/{owner}/{repo}/pulls/{number}/comments/{discussion_id}": { - "put": { - "summary": "修改检视意见解决状态", + }, + "post": { + "summary": "创建仓库里程碑", "deprecated": false, "description": "", - "operationId": "put_api_v5_repos_{owner}_{repo}_pulls_{number}_comments_{discussions_id}", + "operationId": "post_api_v5_repos_{owner}_{repo}_milestones", "tags": [ - "Pulls" + "Milestone" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -31945,31 +33641,11 @@ "type": "string" } }, - { - "name": "number", - "in": "path", - "description": "第几个PR,即本仓库PR的序数。对应iid", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "discussion_id", - "in": "path", - "description": "讨论的ID(字符串类型 id) ", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, { "name": "access_token", "in": "query", "description": "用户授权码", - "required": false, + "required": true, "schema": { "type": "string" } @@ -31981,29 +33657,83 @@ "schema": { "type": "object", "properties": { - "resolved": { - "type": "boolean", - "description": "是否已解决" + "title": { + "type": "string", + "description": "里程碑标题" + }, + "description": { + "type": "string", + "description": "里程碑具体描述" + }, + "due_on": { + "type": "string", + "description": "里程碑的截止日期" } }, "required": [ - "resolved" + "title", + "due_on" ] }, - "example": { - "resolved": true - } + "example": "" } } }, "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { "type": "object", - "properties": {} + "properties": { + "closed_issues": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "due_on": { + "type": "string" + }, + "number": { + "type": "integer" + }, + "open_issues": { + "type": "integer" + }, + "repository_id": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "example": { + "closed_issues": 0, + "created_at": "2024-10-08T10:58:16+08:00", + "description": "你好中国", + "due_on": "2024-11-08", + "number": 4914, + "open_issues": 0, + "repository_id": 4066481, + "state": "active", + "title": "你好中国", + "updated_at": "2024-10-08T10:58:16+08:00", + "url": "https://gitcode.com/dengmengmian/oneapi/milestones/1" } } }, @@ -32013,20 +33743,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/pulls/{number}/reviewers": { - "post": { - "summary": "指派用户评审Pull Request", + "/api/v5/repos/{owner}/{repo}/milestones/{number}": { + "get": { + "summary": "获取仓库单个里程碑", "deprecated": false, "description": "", - "operationId": "post_api_v5_repos_{owner}_{repo}_pulls_{number}_approval_reviewers", + "operationId": "get_api_v5_repos_{owner}_{repo}_milestones_{number}", "tags": [ - "Pulls" + "Milestone" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -32046,87 +33776,78 @@ { "name": "number", "in": "path", - "description": "第几个PR,即本仓库PR的序数。对应iid", + "description": "里程碑序列号(number)", "required": true, "example": "", "schema": { - "type": "string" + "type": "integer" } }, { "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "reviewers": { - "type": "string", - "description": "用户的个人空间地址, 以逗号分隔" - }, - "add": { - "type": "boolean", - "description": "是否新增评审人,为true会新增评审人,false会覆盖更新评审人,默认false" - } - }, - "description": "用户名列表", - "required": [ - "reviewers" - ] - }, - "example": { - "reviewers": "user1", - "add": "true" - } - } - } - }, "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "login": { - "type": "string", - "title": "账号" - }, - "name": { - "type": "string", - "title": "昵称" - }, - "avatar_url": { - "type": "string", - "title": "头像" - }, - "object_id": { - "type": "string", - "title": "id" - } + "type": "object", + "properties": { + "closed_issues": { + "type": "integer" }, - "required": [ - "id", - "login", - "name", - "object_id" - ] + "created_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "due_on": { + "type": "string" + }, + "number": { + "type": "integer" + }, + "open_issues": { + "type": "integer" + }, + "repository_id": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + } } + }, + "example": { + "closed_issues": 0, + "created_at": "2024-10-08T10:58:16+08:00", + "description": "你好中国", + "due_on": "2024-11-08", + "number": 4914, + "open_issues": 0, + "repository_id": 4066481, + "state": "active", + "title": "你好中国", + "updated_at": "2024-10-08T10:58:16+08:00", + "url": "https://gitcode.com/dengmengmian/oneapi/milestones/1" } } }, @@ -32136,18 +33857,18 @@ "security": [] }, "delete": { - "summary": "取消用户评审Pull Request", + "summary": "删除仓库单个里程碑", "deprecated": false, "description": "", - "operationId": "delete_api_v5_repos_{owner}_{repo}_pulls_{number}_approval_reviewers", + "operationId": "delete_api_v5_repos_{owner}_{repo}_milestones_{number}", "tags": [ - "Pulls" + "Milestone" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -32167,11 +33888,11 @@ { "name": "number", "in": "path", - "description": "第几个PR,即本仓库PR的序数。对应iid", + "description": "里程碑序列号(number)", "required": true, "example": "", "schema": { - "type": "string" + "type": "integer" } }, { @@ -32184,64 +33905,14 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "reviewers": { - "type": "string", - "description": "用户的个人空间地址, 以逗号分隔" - } - }, - "required": [ - "reviewers" - ] - }, - "example": { - "testers": "user1,user2" - } - } - } - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "login": { - "type": "string", - "title": "账号" - }, - "name": { - "type": "string", - "title": "昵称" - }, - "avatar_url": { - "type": "string", - "title": "头像" - }, - "object_id": { - "type": "string", - "title": "id" - } - }, - "required": [ - "id", - "login", - "name", - "object_id" - ] - } + "type": "object", + "properties": {} } } }, @@ -32249,22 +33920,20 @@ } }, "security": [] - } - }, - "/api/v5/repos/{owner}/{repo}/pulls/{number}/option_reviewers": { - "get": { - "summary": "获取可作为Pull Request评审人列表", + }, + "patch": { + "summary": "更新仓库里程碑", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_option_approval_reviewers", + "operationId": "patch_api_v5_repos_{owner}_{repo}_milestones_{number}", "tags": [ - "Pulls" + "Milestone" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -32284,11 +33953,11 @@ { "name": "number", "in": "path", - "description": "第几个PR,即本仓库PR的序数。对应iid", + "description": "里程碑序列号(number)", "required": true, "example": "", "schema": { - "type": "string" + "type": "integer" } }, { @@ -32301,43 +33970,93 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "里程碑标题" + }, + "state": { + "type": "string", + "description": "里程碑状态: open, closed, all。默认: open" + }, + "description": { + "type": "string", + "description": "里程碑具体描述" + }, + "due_on": { + "type": "string", + "description": "里程碑的截止日期" + } + }, + "required": [ + "title", + "due_on" + ] + }, + "example": "" + } + } + }, "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "login": { - "type": "string", - "title": "账号" - }, - "name": { - "type": "string", - "title": "昵称" - }, - "avatar_url": { - "type": "string", - "title": "头像" - }, - "object_id": { - "type": "string", - "title": "id" - } + "type": "object", + "properties": { + "closed_issues": { + "type": "integer" }, - "required": [ - "id", - "login", - "name", - "object_id" - ] + "created_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "due_on": { + "type": "string" + }, + "number": { + "type": "integer" + }, + "open_issues": { + "type": "integer" + }, + "repository_id": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + } } + }, + "example": { + "closed_issues": 0, + "created_at": "2024-10-08T10:58:16+08:00", + "description": "你好中国", + "due_on": "2024-11-08", + "number": 4914, + "open_issues": 0, + "repository_id": 4066481, + "state": "active", + "title": "你好中国", + "updated_at": "2024-10-08T10:58:16+08:00", + "url": "https://gitcode.com/dengmengmian/oneapi/milestones/1" } } }, @@ -32347,20 +34066,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/pulls/option_testers": { - "get": { - "summary": "获取可作为Pull Request测试人列表", + "/api/v5/repos/{owner}/{repo}/collaborators/{username}": { + "put": { + "summary": "添加项目成员或更新项目成员权限", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_option_approval_testers", + "operationId": "put_api_v5_repos_{owner}_{repo}_collaborators_{username}", "tags": [ - "Pulls" + "Member" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -32377,6 +34096,16 @@ "type": "string" } }, + { + "name": "username", + "in": "path", + "description": "用户名(username/login)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, { "name": "access_token", "in": "query", @@ -32387,42 +34116,79 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "description": "成员权限: 参与者(pull),开发者(push),仓库维护者(admin), 自定义角色传入角色名。默认: push" + } + } + }, + "example": "" + } + } + }, "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "login": { - "type": "string", - "title": "账号" - }, - "name": { - "type": "string", - "title": "昵称" - }, - "avatar_url": { - "type": "string", - "title": "头像" - }, - "object_id": { - "type": "string", - "title": "id" - } + "type": "object", + "properties": { + "id": { + "type": "integer" }, - "required": [ - "id", - "login", - "name", - "object_id" - ] + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "null" + }, + "html_url": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "type": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "pull": { + "type": "integer" + }, + "push": { + "type": "integer" + }, + "admin": { + "type": "integer" + } + } + } + } + }, + "example": { + "id": 7543745, + "login": "centking", + "name": "占分", + "avatar_url": null, + "html_url": "https://gitcode.com/centking", + "remark": "", + "type": "User", + "permissions": { + "pull": true, + "push": true, + "admin": false } } } @@ -32431,22 +34197,20 @@ } }, "security": [] - } - }, - "/api/v5/repos/{owner}/{repo}/pulls/{number}/user_reactions": { - "get": { - "summary": "获取Pull Request的表态列表", + }, + "delete": { + "summary": "移除项目成员", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_user_reactions", + "operationId": "delete_api_v5_repos_{owner}_{repo}_collaborators_{username}", "tags": [ - "Pulls" + "Member" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -32464,9 +34228,9 @@ } }, { - "name": "number", + "name": "username", "in": "path", - "description": "Pull Request 编号(区分大小写,无需添加 # 号)", + "description": "用户名(username/login)", "required": true, "example": "", "schema": { @@ -32481,30 +34245,68 @@ "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + }, + "get": { + "summary": "判断用户是否为仓库成员", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_collaborators_{username}", + "tags": [ + "Member" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } }, { - "name": "page", - "in": "query", - "description": "当前页码", - "required": false, + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", "schema": { "type": "string" } }, { - "name": "per_page", - "in": "query", - "description": "每页数量", - "required": false, + "name": "username", + "in": "path", + "description": "用户名(username/login)", + "required": true, + "example": "", "schema": { "type": "string" } }, { - "name": "emoji_name", + "name": "access_token", "in": "query", - "description": "emoji表情,可选:like,dislike,smile,confused,love,rocket,eyes,party", - "required": false, + "description": "用户授权码", + "required": true, "schema": { "type": "string" } @@ -32512,57 +34314,19 @@ ], "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "emoji": { - "type": "string", - "title": "emoji表情" - }, - "emoji_name": { - "type": "string", - "title": "emoji表情枚举值" - }, - "user": { - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "object_id": { - "type": "string" - } - }, - "required": [ - "login", - "name", - "avatar_url", - "object_id" - ], - "title": "用户信息" - } - }, - "required": [ - "id", - "emoji", - "emoji_name", - "user" - ] + "type": "object", + "properties": { + "message": { + "type": "string" + } } + }, + "example": { + "message": "404 Not Found" } } }, @@ -32572,20 +34336,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/pulls/comment/{comment_id}/user_reactions": { + "/api/v5/repos/{owner}/{repo}/collaborators": { "get": { - "summary": "获取Pull Request评论的表态列表", + "summary": "获取仓库的所有成员", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_comment_{comment_id}_user_reactions", + "operationId": "get_api_v5_repos_{owner}_{repo}_collaborators", "tags": [ - "Pulls" + "Member" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -32602,16 +34366,6 @@ "type": "string" } }, - { - "name": "comment_id", - "in": "path", - "description": "评论的id", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, { "name": "access_token", "in": "query", @@ -32624,34 +34378,25 @@ { "name": "page", "in": "query", - "description": "当前页码", + "description": "当前的页码:默认为 1", "required": false, "schema": { - "type": "string" + "type": "integer" } }, { "name": "per_page", "in": "query", - "description": "每页数量", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "emoji_name", - "in": "query", - "description": "emoji表情,可选:like,dislike,smile,confused,love,rocket,eyes,party", + "description": "每页的数量,最大为 100,默认 20", "required": false, "schema": { - "type": "string" + "type": "integer" } } ], "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { @@ -32662,45 +34407,113 @@ "id": { "type": "string" }, - "emoji": { - "type": "string", - "title": "emoji表情" + "name": { + "type": "string" }, - "emoji_name": { - "type": "string", - "title": "emoji表情枚举值" + "username": { + "type": "string" }, - "user": { + "nick_name": { + "type": "null" + }, + "state": { + "type": "null" + }, + "avatar": { + "type": "null" + }, + "avatar_url": { + "type": "null" + }, + "email": { + "type": "null" + }, + "name_cn": { + "type": "null" + }, + "web_url": { + "type": "string" + }, + "access_level": { + "type": "null" + }, + "expires_at": { + "type": "null" + }, + "limited": { + "type": "null" + }, + "type": { + "type": "string" + }, + "last_owner": { + "type": "null" + }, + "is_current_source_member": { + "type": "null" + }, + "last_source_owner": { + "type": "null" + }, + "join_way": { + "type": "null" + }, + "source_name": { + "type": "null" + }, + "member_roles": { + "type": "null" + }, + "iam_id": { + "type": "null" + }, + "committer_system_from": { + "type": "null" + }, + "permissions": { "type": "object", "properties": { - "login": { - "type": "string" - }, - "name": { - "type": "string" + "pull": { + "type": "null" }, - "avatar_url": { - "type": "string" + "push": { + "type": "null" }, - "object_id": { - "type": "string" + "admin": { + "type": "integer" } - }, - "required": [ - "login", - "name", - "avatar_url", - "object_id" - ], - "title": "用户信息" + } } - }, - "required": [ - "id", - "emoji", - "emoji_name", - "user" - ] + } + } + }, + "example": { + "id": "708", + "name": "Lzm_0916", + "username": "Lzm_0916", + "nick_name": null, + "state": null, + "avatar": null, + "avatar_url": null, + "email": null, + "name_cn": null, + "web_url": "https://test.gitcode.net/Lzm_0916", + "access_level": null, + "expires_at": null, + "limited": null, + "type": "ProjectMember", + "last_owner": null, + "is_current_source_member": null, + "last_source_owner": null, + "join_way": null, + "source_name": null, + "member_roles": null, + "iam_id": null, + "committer_system_from": null, + "permissions": { + "pull": null, + "push": null, + "admin": true } } } @@ -32711,20 +34524,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/pulls/{number}/modify_history": { + "/api/v5/repos/{owner}/{repo}/collaborators/{username}/permission": { "get": { - "summary": "获取Pull Request的修改历史", + "summary": "查看仓库成员的权限", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_{number}_modify_history", + "operationId": "get_api_v5_repos_{owner}_{repo}_collaborators_{username}_permission", "tags": [ - "Pulls" + "Member" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -32742,9 +34555,9 @@ } }, { - "name": "number", + "name": "username", "in": "path", - "description": "Pull Request 编号(区分大小写,无需添加 # 号)", + "description": "用户名(username/login)", "required": true, "example": "", "schema": { @@ -32763,96 +34576,96 @@ ], "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "created_at": { - "type": "string", - "title": "创建时间" - }, - "updated_at": { - "type": "string", - "title": "修改时间" - }, - "deleted": { - "type": "boolean", - "title": "是否已删除" - }, - "created": { - "type": "boolean", - "title": "是否是创建" - }, - "content": { - "type": "string", - "title": "修改后的内容" - }, - "user": { - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "object_id": { - "type": "string" - } - }, - "required": [ - "login", - "name", - "avatar_url", - "object_id" - ], - "title": "用户信息" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "nick_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "email": { + "type": "string" + }, + "web_url": { + "type": "string" + }, + "access_level": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "join_way": { + "type": "string" + }, + "source_name": { + "type": "string" + }, + "role_name": { + "type": "string" + }, + "role_name_cn": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "admin": { + "type": "boolean" + } }, - "updated_user": { - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "object_id": { - "type": "string" - } - }, - "required": [ - "login", - "name", - "avatar_url", - "object_id" - ] - } + "required": [ + "admin" + ] }, - "required": [ - "id", - "created_at", - "updated_at", - "deleted", - "created", - "content", - "user", - "updated_user" - ] - } + "object_id": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "login": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "nick_name", + "state", + "email", + "web_url", + "access_level", + "type", + "join_way", + "source_name", + "role_name", + "role_name_cn", + "permissions", + "object_id", + "permission", + "login" + ] + }, + "example": { + "id": 268, + "login": "dengmengmian", + "permission": "admin" } } }, @@ -32862,14 +34675,14 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/pulls/comment/{comment_id}/modify_history": { + "/api/v5/repos/{owner}/{repo}/collaborators/self-permission": { "get": { - "summary": "获取Pull Request评论的修改历史", + "summary": "查看当前成员仓库的权限点", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_pulls_comment_{comment_id}_modify_history", + "operationId": "get_api_v5_repos_{owner}_{repo}_collaborators_self-permission", "tags": [ - "Pulls" + "Member" ], "parameters": [ { @@ -32892,21 +34705,11 @@ "type": "string" } }, - { - "name": "comment_id", - "in": "path", - "description": "评论的id", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, { "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -32918,264 +34721,1250 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "created_at": { - "type": "string", - "title": "创建时间" - }, - "updated_at": { - "type": "string", - "title": "修改时间" - }, - "deleted": { - "type": "boolean", - "title": "是否已删除" - }, - "created": { - "type": "boolean", - "title": "是否是创建" - }, - "content": { - "type": "string", - "title": "修改后的内容" + "type": "object", + "properties": { + "role_info": { + "type": "object", + "properties": { + "role_uuid": { + "type": "string", + "description": "角色id" + }, + "name": { + "type": "string", + "description": "角色名称" + }, + "cn_name": { + "type": "string", + "description": "角色中文名称" + }, + "roles_type": { + "type": "integer", + "description": "角色类型" + }, + "access_level": { + "type": "integer", + "description": "角色等级" + } }, - "user": { + "required": [ + "role_uuid", + "name", + "cn_name", + "roles_type", + "access_level" + ], + "description": "用户角色" + }, + "resource_trees": { + "type": "array", + "items": { "type": "object", "properties": { - "login": { - "type": "string" + "resource_id": { + "type": "integer", + "description": "资源id" }, "name": { - "type": "string" + "type": "string", + "description": "资源名称" }, - "avatar_url": { - "type": "string" + "cn_name": { + "type": "string", + "description": "资源中文名称" }, - "object_id": { - "type": "string" - } - }, - "required": [ - "login", - "name", - "avatar_url", - "object_id" - ], - "title": "用户信息" - }, - "updated_user": { - "type": "object", - "properties": { - "login": { - "type": "string" + "scope": { + "type": "string", + "description": "资源标识" }, - "name": { - "type": "string" + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "permission_id": { + "type": "integer", + "description": "权限点 id" + }, + "action": { + "type": "string", + "description": "权限点" + }, + "name": { + "type": "string", + "description": "权限点名称" + }, + "cn_name": { + "type": "string", + "description": "权限点中文名称" + }, + "selected": { + "type": "boolean", + "description": "是否拥有" + } + }, + "required": [ + "permission_id", + "action", + "name", + "cn_name", + "selected" + ] + }, + "description": "权限点" }, - "avatar_url": { - "type": "string" + "path": { + "type": "string", + "description": "权限路径" }, - "object_id": { - "type": "string" + "is_own": { + "type": "integer" + }, + "order_num": { + "type": "integer", + "description": "排序字段" } }, "required": [ - "login", + "resource_id", "name", - "avatar_url", - "object_id" + "cn_name", + "scope", + "actions", + "path", + "is_own", + "order_num" ] - } - }, - "required": [ - "id", - "created_at", - "updated_at", - "deleted", - "created", - "content", - "user", - "updated_user" - ] - } - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/api/v5/repos/{owner}/{repo}/milestones": { - "get": { - "summary": "获取仓库所有里程碑", - "deprecated": false, - "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_milestones", - "tags": [ - "Milestone" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "description": "里程碑状态: open, closed, all。默认: open", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "排序方式: due_on", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "direction", - "in": "query", - "description": "升序(asc)或是降序(desc)。默认: asc", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "当前的页码", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "per_page", - "in": "query", - "description": "每页的数量,最大为 100,默认 20", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "成功响应", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "closed_issues": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "description": { - "type": "string" - }, - "due_on": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "open_issues": { - "type": "integer" - }, - "repository_id": { - "type": "integer" - }, - "state": { - "type": "string" - }, - "title": { - "type": "string" }, - "updated_at": { - "type": "string" - }, - "url": { - "type": "string" - } + "description": "用户权限矩阵树" } - } + }, + "required": [ + "role_info", + "resource_trees" + ] }, "example": { - "closed_issues": 0, - "created_at": "2024-10-08T10:58:16+08:00", - "description": "你好中国", - "due_on": "2024-11-08", - "number": 4914, - "open_issues": 0, - "repository_id": 4066481, - "state": "active", - "title": "你好中国", - "updated_at": "2024-10-08T10:58:16+08:00", - "url": "https://gitcode.com/dengmengmian/oneapi/milestones/1" - } - } - }, - "headers": {} - } - }, - "security": [] - }, - "post": { - "summary": "创建仓库里程碑", - "deprecated": false, - "description": "", - "operationId": "post_api_v5_repos_{owner}_{repo}_milestones", - "tags": [ - "Milestone" - ], - "parameters": [ - { - "name": "owner", - "in": "path", + "role_info": { + "role_uuid": "45a9-276d8e546f1b05f9f98ce1ffdc6", + "name": "Owner", + "cn_name": "管理员", + "roles_type": 1, + "access_level": 50 + }, + "resource_trees": [ + { + "resource_id": 2, + "name": "repo", + "cn_name": "项目", + "scope": "repo", + "actions": [ + { + "permission_id": 5, + "action": "fork", + "name": "fork", + "cn_name": "fork", + "selected": true + }, + { + "permission_id": 6, + "action": "update", + "name": "update", + "cn_name": "更新", + "selected": true + }, + { + "permission_id": 7, + "action": "delete", + "name": "delete", + "cn_name": "删除", + "selected": true + }, + { + "permission_id": 8, + "action": "setting", + "name": "setting", + "cn_name": "设置", + "selected": true + }, + { + "permission_id": 9, + "action": "archive", + "name": "archive", + "cn_name": "归档", + "selected": true + }, + { + "permission_id": 10, + "action": "transfer", + "name": "transfer", + "cn_name": "转移", + "selected": true + } + ] + }, + { + "resource_id": 4, + "name": "code", + "cn_name": "代码", + "scope": "code", + "actions": [ + { + "permission_id": 14, + "action": "push", + "name": "push", + "cn_name": "推送", + "selected": true + }, + { + "permission_id": 15, + "action": "download", + "name": "download", + "cn_name": "下载", + "selected": true + } + ] + }, + { + "resource_id": 14, + "name": "wiki", + "cn_name": "Wiki", + "scope": "wiki", + "actions": [ + { + "permission_id": 48, + "action": "push", + "name": "push", + "cn_name": "推送", + "selected": true + }, + { + "permission_id": 49, + "action": "download", + "name": "download", + "cn_name": "下载", + "selected": true + } + ] + }, + { + "resource_id": 5, + "name": "member", + "cn_name": "成员", + "scope": "member", + "actions": [ + { + "permission_id": 16, + "action": "create", + "name": "create", + "cn_name": "邀请", + "selected": true + }, + { + "permission_id": 17, + "action": "update", + "name": "update", + "cn_name": "更新", + "selected": true + }, + { + "permission_id": 18, + "action": "delete", + "name": "delete", + "cn_name": "移除", + "selected": true + } + ] + }, + { + "resource_id": 6, + "name": "issue", + "cn_name": "Issue", + "scope": "issue", + "actions": [ + { + "permission_id": 19, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 20, + "action": "update", + "name": "update", + "cn_name": "更新", + "selected": true + }, + { + "permission_id": 22, + "action": "reopen", + "name": "reopen", + "cn_name": "关闭/重开", + "selected": true + }, + { + "permission_id": 23, + "action": "pin", + "name": "pin", + "cn_name": "置顶", + "selected": true + }, + { + "permission_id": 24, + "action": "lock", + "name": "lock", + "cn_name": "锁定", + "selected": true + }, + { + "permission_id": 11, + "action": "delete", + "name": "delete", + "cn_name": "删除", + "selected": true + } + ] + }, + { + "resource_id": 7, + "name": "label", + "cn_name": "Label", + "scope": "label", + "actions": [ + { + "permission_id": 25, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 26, + "action": "update", + "name": "update", + "cn_name": "更新", + "selected": true + }, + { + "permission_id": 27, + "action": "delete", + "name": "delete", + "cn_name": "删除", + "selected": true + } + ] + }, + { + "resource_id": 8, + "name": "milestone", + "cn_name": "里程碑", + "scope": "milestone", + "actions": [ + { + "permission_id": 28, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 29, + "action": "update", + "name": "update", + "cn_name": "更新", + "selected": true + }, + { + "permission_id": 30, + "action": "delete", + "name": "delete", + "cn_name": "删除", + "selected": true + } + ] + }, + { + "resource_id": 9, + "name": "branch", + "cn_name": "分支", + "scope": "branch", + "actions": [ + { + "permission_id": 31, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 32, + "action": "delete", + "name": "delete", + "cn_name": "删除", + "selected": true + } + ] + }, + { + "resource_id": 10, + "name": "tag", + "cn_name": "Tag", + "scope": "tag", + "actions": [ + { + "permission_id": 33, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 34, + "action": "delete", + "name": "delete", + "cn_name": "删除", + "selected": true + } + ] + }, + { + "resource_id": 12, + "name": "pr", + "cn_name": "PullRequest", + "scope": "pr", + "actions": [ + { + "permission_id": 38, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 39, + "action": "update", + "name": "update", + "cn_name": "更新", + "selected": true + }, + { + "permission_id": 40, + "action": "review", + "name": "review", + "cn_name": "评审", + "selected": true + }, + { + "permission_id": 41, + "action": "approve", + "name": "approve", + "cn_name": "审核", + "selected": true + }, + { + "permission_id": 42, + "action": "merge", + "name": "merge", + "cn_name": "合并", + "selected": true + }, + { + "permission_id": 43, + "action": "close", + "name": "close", + "cn_name": "关闭", + "selected": true + }, + { + "permission_id": 44, + "action": "reopen", + "name": "reopen", + "cn_name": "重开", + "selected": true + }, + { + "permission_id": 47, + "action": "test", + "name": "test", + "cn_name": "测试", + "selected": true + } + ] + }, + { + "resource_id": 13, + "name": "note", + "cn_name": "评论", + "scope": "note", + "actions": [ + { + "permission_id": 45, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 46, + "action": "resolve", + "name": "resolve", + "cn_name": "解决", + "selected": true + } + ] + }, + { + "resource_id": 0, + "name": "pipeline", + "cn_name": "流水线", + "scope": "pipeline", + "path": "/gitcode/repo/pipeline/*", + "is_own": 1, + "order_num": 10, + "actions": [ + { + "permission_id": 0, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 0, + "action": "update", + "name": "update", + "cn_name": "更新", + "selected": true + }, + { + "permission_id": 0, + "action": "delete", + "name": "delete", + "cn_name": "删除(构建记录)", + "selected": true + }, + { + "permission_id": 0, + "action": "run", + "name": "run", + "cn_name": "运行", + "selected": true + }, + { + "permission_id": 0, + "action": "rerun", + "name": "rerun", + "cn_name": "重新运行", + "selected": true + } + ] + }, + { + "resource_id": 0, + "name": "discussion", + "cn_name": "讨论", + "scope": "discussion", + "path": "/gitcode/repo/discussion/*", + "is_own": 1, + "order_num": 15, + "actions": [ + { + "permission_id": 0, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 0, + "action": "update", + "name": "update", + "cn_name": "更新", + "selected": true + }, + { + "permission_id": 0, + "action": "lock", + "name": "lock", + "cn_name": "锁定", + "selected": true + }, + { + "permission_id": 0, + "action": "pin", + "name": "pin", + "cn_name": "置顶", + "selected": true + }, + { + "permission_id": 0, + "action": "close", + "name": "close", + "cn_name": "关闭/重开", + "selected": true + } + ] + }, + { + "resource_id": 0, + "name": "kanban", + "cn_name": "看板", + "scope": "kanban", + "path": "/gitcode/repo/kanban/*", + "is_own": 1, + "order_num": 16, + "actions": [ + { + "permission_id": 0, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 0, + "action": "update", + "name": "update", + "cn_name": "更新", + "selected": true + }, + { + "permission_id": 0, + "action": "delete", + "name": "delete", + "cn_name": "删除", + "selected": true + }, + { + "permission_id": 0, + "action": "close", + "name": "close", + "cn_name": "关闭/重开", + "selected": true + } + ] + }, + { + "resource_id": 0, + "name": "collection", + "cn_name": "合集", + "scope": "collection", + "path": "/gitcode/repo/collection/*", + "is_own": 1, + "order_num": 18, + "actions": [ + { + "permission_id": 0, + "action": "create", + "name": "create", + "cn_name": "创建", + "selected": true + }, + { + "permission_id": 0, + "action": "update", + "name": "update", + "cn_name": "更新", + "selected": true + }, + { + "permission_id": 0, + "action": "delete", + "name": "delete", + "cn_name": "删除", + "selected": true + } + ] + } + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/repos/{owner}/{repo}/hooks": { + "get": { + "summary": "列出仓库的WebHooks", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_hooks", + "tags": [ + "Webhooks" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前的页码", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的数量,最大为 100,默认 20", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "password": { + "type": "string" + }, + "result": { + "type": "string" + }, + "project_id": { + "type": "integer" + }, + "result_code": { + "type": "integer" + }, + "push_events": { + "type": "integer" + }, + "tag_push_events": { + "type": "integer" + }, + "issues_events": { + "type": "integer" + }, + "note_events": { + "type": "integer" + }, + "merge_requests_events": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "active": { + "type": "boolean", + "description": "是否激活" + } + } + } + }, + "example": { + "id": 9523, + "url": "http://duxwsqdkyx.cu/pxssss", + "password": "123445", + "result": "not found", + "project_id": 282463, + "result_code": 503, + "push_events": false, + "tag_push_events": false, + "issues_events": true, + "note_events": false, + "merge_requests_events": true, + "created_at": "2024-09-18T17:51:44+08:00" + } + } + }, + "headers": {} + } + }, + "security": [] + }, + "post": { + "summary": "创建一个仓库的WebHooks", + "deprecated": false, + "description": "", + "operationId": "post_api_v5_repos_{owner}_{repo}_hooks", + "tags": [ + "Webhooks" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "远程HTTP URL" + }, + "encryption_type": { + "type": "integer", + "description": "加密类型: 0: 密码, 1: 签名密钥" + }, + "password": { + "type": "string", + "description": "请求URL时会带上该密码,防止URL被恶意请求" + }, + "push_events": { + "type": "boolean", + "description": "Push代码到仓库" + }, + "tag_push_events": { + "type": "boolean", + "description": "提交Tag到仓库" + }, + "issues_events": { + "type": "boolean", + "description": "创建/关闭Issue" + }, + "note_events": { + "type": "boolean", + "description": "评论了Issue/代码等等" + }, + "merge_requests_events": { + "type": "boolean", + "description": "合并请求和合并后" + } + }, + "required": [ + "url" + ] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "password": { + "type": "string" + }, + "result": { + "type": "null" + }, + "project_id": { + "type": "integer" + }, + "result_code": { + "type": "integer" + }, + "push_events": { + "type": "integer" + }, + "tag_push_events": { + "type": "integer" + }, + "issues_events": { + "type": "integer" + }, + "note_events": { + "type": "integer" + }, + "merge_requests_events": { + "type": "integer" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "id": 9529, + "url": "http://duxwsqdkyx.cu/pxddddd", + "password": "123445", + "result": null, + "project_id": 282463, + "result_code": 0, + "push_events": false, + "tag_push_events": false, + "issues_events": true, + "note_events": false, + "merge_requests_events": true, + "created_at": "2024-09-26T16:13:27+08:00" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/repos/{owner}/{repo}/hooks/{id}": { + "get": { + "summary": "获取仓库单个WebHook", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_hooks_{id}", + "tags": [ + "Webhooks" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Webhook的ID", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "password": { + "type": "string" + }, + "result": { + "type": "null" + }, + "project_id": { + "type": "integer" + }, + "result_code": { + "type": "integer" + }, + "push_events": { + "type": "integer" + }, + "tag_push_events": { + "type": "integer" + }, + "issues_events": { + "type": "integer" + }, + "note_events": { + "type": "integer" + }, + "merge_requests_events": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "active": { + "type": "boolean", + "description": "是否激活" + } + } + }, + "example": { + "id": 9529, + "url": "http://duxwsqdkyx.cu/pxddddd", + "password": "123445", + "result": null, + "project_id": 282463, + "result_code": 0, + "push_events": false, + "tag_push_events": false, + "issues_events": true, + "note_events": false, + "merge_requests_events": true, + "created_at": "2024-09-26T16:13:27+08:00" + } + } + }, + "headers": {} + } + }, + "security": [] + }, + "patch": { + "summary": "更新一个仓库WebHook", + "deprecated": false, + "description": "", + "operationId": "patch_api_v5_repos_{owner}_{repo}_hooks_{id}", + "tags": [ + "Webhooks" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Webhook的ID", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "远程HTTP URL" + }, + "encryption_type": { + "type": "integer", + "description": "加密类型: 0: 密码, 1: 签名密钥" + }, + "password": { + "type": "string", + "description": "请求URL时会带上该密码,防止URL被恶意请求" + }, + "push_events": { + "type": "boolean", + "description": "Push代码到仓库" + }, + "tag_push_events": { + "type": "boolean", + "description": "提交Tag到仓库" + }, + "issues_events": { + "type": "boolean", + "description": "创建/关闭Issue" + }, + "note_events": { + "type": "boolean", + "description": "评论了Issue/代码等等" + }, + "merge_requests_events": { + "type": "boolean", + "description": "合并请求和合并后" + } + }, + "required": [ + "url" + ] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "password": { + "type": "string" + }, + "result": { + "type": "null" + }, + "project_id": { + "type": "integer" + }, + "result_code": { + "type": "integer" + }, + "push_events": { + "type": "integer" + }, + "tag_push_events": { + "type": "integer" + }, + "issues_events": { + "type": "integer" + }, + "note_events": { + "type": "integer" + }, + "merge_requests_events": { + "type": "integer" + }, + "created_at": { + "type": "string" + } + } + }, + "example": { + "url": "http://duxwsqdkyx.cu/pxddddd", + "password": "123445", + "result": null, + "project_id": 282463, + "result_code": 0, + "push_events": false, + "tag_push_events": false, + "issues_events": true, + "note_events": false, + "merge_requests_events": true, + "created_at": "2024-09-26T16:13:27+08:00" + } + } + }, + "headers": {} + } + }, + "security": [] + }, + "delete": { + "summary": "删除一个仓库WebHook", + "deprecated": false, + "description": "", + "operationId": "delete_api_v5_repos_{owner}_{repo}_hooks_{id}", + "tags": [ + "Webhooks" + ], + "parameters": [ + { + "name": "owner", + "in": "path", "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", @@ -33193,99 +35982,34 @@ "type": "string" } }, + { + "name": "id", + "in": "path", + "description": "Webhook的ID", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, { "name": "access_token", "in": "query", "description": "用户授权码", - "required": false, + "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "里程碑标题" - }, - "description": { - "type": "string", - "description": "里程碑具体描述" - }, - "due_on": { - "type": "string", - "description": "里程碑的截止日期" - } - }, - "required": [ - "title", - "due_on" - ] - }, - "example": "" - } - } - }, "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", - "properties": { - "closed_issues": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "description": { - "type": "string" - }, - "due_on": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "open_issues": { - "type": "integer" - }, - "repository_id": { - "type": "integer" - }, - "state": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "example": { - "closed_issues": 0, - "created_at": "2024-10-08T10:58:16+08:00", - "description": "你好中国", - "due_on": "2024-11-08", - "number": 4914, - "open_issues": 0, - "repository_id": 4066481, - "state": "active", - "title": "你好中国", - "updated_at": "2024-10-08T10:58:16+08:00", - "url": "https://gitcode.com/dengmengmian/oneapi/milestones/1" + "properties": {} } } }, @@ -33295,14 +36019,14 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/milestones/{number}": { - "get": { - "summary": "获取仓库单个里程碑", + "/api/v5/repos/{owner}/{repo}/hooks/{id}/tests": { + "post": { + "summary": "测试WebHook是否发送成功", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_milestones_{number}", + "operationId": "post_api_v5_repos_{owner}_{repo}_hooks_{id}_tests", "tags": [ - "Milestone" + "Webhooks" ], "parameters": [ { @@ -33326,23 +36050,251 @@ } }, { - "name": "number", + "name": "id", "in": "path", - "description": "里程碑序列号(number)", + "description": "Webhook的ID", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", "required": true, - "example": 0, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/search/users": { + "get": { + "summary": "搜索用户", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_search_users", + "tags": [ + "Search" + ], + "parameters": [ + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前的页码 最大为 100", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的数量,最大为 50", + "required": false, "schema": { "type": "integer" } }, + { + "name": "q", + "in": "query", + "description": "搜索关键字", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "排序字段,joined_at(注册时间),默认为最佳匹配", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "排序顺序 (默认:desc)", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "avatar_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + }, + "examples": { + "1": { + "summary": "成功示例", + "value": { + "avatar_url": "https://cdn-img.gitcode.com/bb/bf/b1b0bff5bafab700603248485bc4a236061f84433741855a9ce8b0c42c8.png", + "created_at": "2024-11-15T00:00:00+08:00", + "html_url": "https://gitcode.com/wu_com", + "id": "25235036", + "login": "wu_com", + "name": "wu_com" + } + }, + "2": { + "summary": "成功示例", + "value": { + "avatar_url": "https://cdn-img.gitcode.com/ad/ec/a8670853d9137e2c34efbc14904985a7cc5998929bfebca9ceb8626e170.png", + "created_at": "2024-11-15T00:00:00+08:00", + "html_url": "https://gitcode.com/wu5567488", + "id": "25153392", + "login": "wu5567488", + "name": "wu5567488" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/search/issues": { + "get": { + "summary": "搜索 Issues", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_search_issues", + "tags": [ + "Search" + ], + "parameters": [ { "name": "access_token", "in": "query", "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前的页码 最大为 100", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的数量,最大为 50", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "q", + "in": "query", + "description": "搜索关键字", "required": true, "schema": { "type": "string" } + }, + { + "name": "sort", + "in": "query", + "description": "排序字段,created_at(创建时间)、last_push_at(更新时间),默认为最佳匹配", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "排序顺序 (默认:desc)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "query", + "description": "仓库路径", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "in": "query", + "description": "筛选指定状态的 issues, open(开启)、closed(完成)", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -33351,55 +36303,166 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "closed_issues": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "description": { - "type": "string" - }, - "due_on": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "open_issues": { - "type": "integer" - }, - "repository_id": { - "type": "integer" - }, - "state": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "url": { - "type": "string" + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "string" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "full_name": { + "type": "string" + }, + "human_name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + }, + "priority": { + "type": "integer" + }, + "comments": { + "type": "integer" + }, + "parent_id": { + "type": "integer" + } + } + } + }, + "examples": { + "1": { + "summary": "成功示例", + "value": { + "id": 548499, + "html_url": "https://gitcode.com/youlai/vue3-element-admin/issues/1", + "number": "1", + "state": "open", + "title": "test", + "body": "test", + "repository": { + "id": 3771502, + "full_name": "youlai/vue3-element-admin", + "human_name": "有来开源组织 / vue3-element-admin", + "path": "vue3-element-admin", + "name": "vue3-element-admin", + "url": "https://gitcode.com/youlai/vue3-element-admin", + "owner": { + "avatar_url": "https://cdn-img.gitcode.com/fc/ae/3f96c31289ae838297c61f385af9c2e6357216a1906205f56d50f3e268319d8b.png?time=1724590827689", + "html_url": "https://gitcode.com/u013737132", + "id": "6553a045ac27540b6bfcb436", + "login": "u013737132", + "name": "有来技术", + "type": "User" + } + }, + "created_at": "2024-11-07T18:11:23+08:00", + "updated_at": "2024-11-07T18:11:23+08:00", + "labels": [], + "priority": 0, + "comments": 0, + "parent_id": 0 + } + }, + "2": { + "summary": "成功示例", + "value": { + "id": 518776, + "html_url": "https://gitcode.com/openUBMC-test/openubmc-ci/issues/4", + "number": "4", + "state": "open", + "title": "test_1", + "body": "11111", + "repository": { + "id": 4261097, + "full_name": "openUBMC-test/openubmc-ci", + "human_name": "openUBMC-test / openubmc-ci", + "path": "openubmc-ci", + "name": "openubmc-ci", + "url": "https://gitcode.com/openUBMC-test/openubmc-ci", + "owner": { + "avatar_url": "https://cdn-img.gitcode.com/fd/ab/256f0d7a9b2b771a883a9a2975f6bb8804dbcc53df334a63a508306f86fe6c2c.jpg", + "html_url": "https://gitcode.com/levi3053", + "id": "671af08b9a767f4c7b6b0681", + "login": "levi3053", + "name": "BellllllYu@N.L¡", + "type": "User" + } + }, + "created_at": "2024-11-01T14:12:21+08:00", + "updated_at": "2024-11-01T14:15:00+08:00", + "labels": [], + "priority": 0, + "comments": 2, + "parent_id": 0 } } - }, - "example": { - "closed_issues": 0, - "created_at": "2024-10-08T10:58:16+08:00", - "description": "你好中国", - "due_on": "2024-11-08", - "number": 4914, - "open_issues": 0, - "repository_id": 4066481, - "state": "active", - "title": "你好中国", - "updated_at": "2024-10-08T10:58:16+08:00", - "url": "https://gitcode.com/dengmengmian/oneapi/milestones/1" } } }, @@ -33407,340 +36470,380 @@ } }, "security": [] - }, - "delete": { - "summary": "删除仓库单个里程碑", + } + }, + "/api/v5/search/repositories": { + "get": { + "summary": "搜索仓库", "deprecated": false, "description": "", - "operationId": "delete_api_v5_repos_{owner}_{repo}_milestones_{number}", + "operationId": "get_api_v5_search_repositories", "tags": [ - "Milestone" + "Search" ], "parameters": [ { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", + "name": "access_token", + "in": "query", + "description": "用户授权码", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "number", - "in": "path", - "description": "里程碑序列号(number)", - "required": true, - "example": 0, + "name": "page", + "in": "query", + "description": "当前的页码 最大为 100", + "required": false, "schema": { "type": "integer" } }, { - "name": "access_token", + "name": "per_page", "in": "query", - "description": "用户授权码", + "description": "每页的数量,最大为 20", "required": false, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - }, - "headers": {} - } - }, - "security": [] - }, - "patch": { - "summary": "更新仓库里程碑", - "deprecated": false, - "description": "", - "operationId": "patch_api_v5_repos_{owner}_{repo}_milestones_{number}", - "tags": [ - "Milestone" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" + "type": "integer" } }, { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", + "name": "q", + "in": "query", + "description": "搜索关键字", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "number", - "in": "path", - "description": "里程碑序列号(number)", - "required": true, - "example": 0, + "name": "sort", + "in": "query", + "description": "排序字段,last_push_at(更新时间)、stars_count(收藏数)、forks_count(Fork 数),默认为最佳匹配", + "required": false, "schema": { - "type": "integer" + "type": "string" } }, { - "name": "access_token", + "name": "order", "in": "query", - "description": "用户授权码", + "description": "排序顺序 (默认:desc)", "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "里程碑标题" - }, - "state": { - "type": "string", - "description": "里程碑状态: open, closed, all。默认: open" - }, - "description": { - "type": "string", - "description": "里程碑具体描述" - }, - "due_on": { - "type": "string", - "description": "里程碑的截止日期" - } - }, - "required": [ - "title", - "due_on" - ] - }, - "example": "" - } - } - }, - "responses": { - "200": { - "description": "成功响应", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "closed_issues": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "description": { - "type": "string" - }, - "due_on": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "open_issues": { - "type": "integer" - }, - "repository_id": { - "type": "integer" - }, - "state": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "example": { - "closed_issues": 0, - "created_at": "2024-10-08T10:58:16+08:00", - "description": "你好中国", - "due_on": "2024-11-08", - "number": 4914, - "open_issues": 0, - "repository_id": 4066481, - "state": "active", - "title": "你好中国", - "updated_at": "2024-10-08T10:58:16+08:00", - "url": "https://gitcode.com/dengmengmian/oneapi/milestones/1" - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/api/v5/repos/{owner}/{repo}/collaborators/{username}": { - "put": { - "summary": "添加项目成员或更新项目成员权限", - "deprecated": false, - "description": "", - "operationId": "put_api_v5_repos_{owner}_{repo}_collaborators_{username}", - "tags": [ - "Member" - ], - "parameters": [ + }, { "name": "owner", - "in": "path", + "in": "query", "description": "仓库所属空间地址(组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, - "example": "", + "required": false, "schema": { "type": "string" } }, { - "name": "username", - "in": "path", - "description": "用户名(username/login)", - "required": true, - "example": "", + "name": "fork", + "in": "query", + "description": "是否搜索含 fork 的仓库,如果显示,受白名单限制,默认:否", + "required": false, "schema": { "type": "string" } }, { - "name": "access_token", + "name": "language", "in": "query", - "description": "用户授权码", - "required": true, + "description": "筛选指定语言的仓库", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "permission": { - "type": "string", - "description": "成员权限: 拉代码(pull),推代码(push),仓库维护者(admin), 自定义角色传入角色名。默认: push" - } - } - }, - "example": "" - } - } - }, "responses": { "200": { "description": "成功响应", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "null" - }, - "html_url": { - "type": "string" - }, - "remark": { - "type": "string" - }, - "type": { - "type": "string" - }, - "permissions": { - "type": "object", - "properties": { - "pull": { - "type": "integer" - }, - "push": { - "type": "integer" - }, - "admin": { - "type": "integer" + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "full_name": { + "type": "string" + }, + "human_name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "namespace": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "html_url": { + "type": "string" + } + } + }, + "path": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "status": { + "type": "string" + }, + "ssh_url_to_repo": { + "type": "string" + }, + "http_url_to_repo": { + "type": "string" + }, + "web_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "homepage": { + "type": "string" + }, + "members": { + "type": "array", + "items": { + "type": "string" + } + }, + "forks_count": { + "type": "integer" + }, + "stargazers_count": { + "type": "integer" + }, + "relation": { + "type": "string" + }, + "permission": { + "type": "object", + "properties": { + "push": { + "type": "integer" + } + } + }, + "internal": { + "type": "integer" + }, + "open_issues_count": { + "type": "integer" + }, + "has_issue": { + "type": "integer" + }, + "watchers_count": { + "type": "integer" + }, + "enterprise": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "path": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "default_branch": { + "type": "string" + }, + "fork": { + "type": "integer" + }, + "pushed_at": { + "type": "string" + }, + "owner": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } } + }, + "issue_template_source": { + "type": "string" + }, + "private": { + "type": "integer" + }, + "public": { + "type": "integer" } } - } - }, - "example": { - "id": 7543745, - "login": "centking", - "name": "占分", - "avatar_url": null, - "html_url": "https://gitcode.com/centking", - "remark": "", - "type": "User", - "permissions": { - "pull": true, - "push": true, - "admin": false + } + }, + "examples": { + "1": { + "summary": "成功示例", + "value": { + "id": 1431191, + "full_name": "gh_mirrors/al/allure2", + "human_name": "GitHub 加速计划 / al / allure2", + "url": "https://api.gitcode.com/api/v5/repos/gh_mirrors/al/allure2", + "namespace": { + "id": 2192652, + "type": "enterprise", + "name": "al", + "path": "al", + "html_url": "https://gitcode.com/al" + }, + "path": "allure2", + "name": "allure2", + "description": "Allure Report is a flexible, lightweight multi-language test reporting tool. It provides clear graphical reports and allows everyone involved in the development process to extract the maximum of information from the everyday testing process", + "status": "开始", + "ssh_url_to_repo": "git@gitcode.com:gh_mirrors/al/allure2.git", + "http_url_to_repo": "https://gitcode.com/gh_mirrors/al/allure2.git", + "web_url": "https://gitcode.com/gh_mirrors/al/allure2", + "created_at": "2023-12-18T00:42:15.557+08:00", + "updated_at": "2024-11-05T10:54:59.948+08:00", + "homepage": "https://gitcode.com/gh_mirrors/al/allure2", + "members": [ + "Gitcode-Assistant", + "coco_gitcode", + "gitshumei" + ], + "forks_count": 0, + "stargazers_count": 9, + "relation": "", + "permission": { + "push": false + }, + "internal": false, + "open_issues_count": 0, + "has_issue": false, + "watchers_count": 4, + "enterprise": { + "id": 2192652, + "path": "al", + "html_url": "https://gitcode.com/al", + "type": "enterprise" + }, + "default_branch": "main", + "fork": false, + "pushed_at": "2024-08-06T23:34:38.476+08:00", + "owner": { + "id": "69090", + "login": "coco_gitcode", + "name": "GitCode优质项目", + "type": "User" + }, + "issue_template_source": "project", + "private": false, + "public": true + } + }, + "2": { + "summary": "成功示例", + "value": { + "id": 1401745, + "full_name": "gh_mirrors/pr/printf", + "human_name": "GitHub 加速计划 / pr / printf", + "url": "https://api.gitcode.com/api/v5/repos/gh_mirrors/pr/printf", + "namespace": { + "id": 2192766, + "type": "enterprise", + "name": "pr", + "path": "pr", + "html_url": "https://gitcode.com/pr" + }, + "path": "printf", + "name": "printf", + "description": "Tiny, fast, non-dependent and fully loaded printf implementation for embedded systems. Extensive test suite passing.", + "status": "开始", + "ssh_url_to_repo": "git@gitcode.com:gh_mirrors/pr/printf.git", + "http_url_to_repo": "https://gitcode.com/gh_mirrors/pr/printf.git", + "web_url": "https://gitcode.com/gh_mirrors/pr/printf", + "created_at": "2023-12-16T20:28:57.687+08:00", + "updated_at": "2024-09-27T21:48:26.980+08:00", + "homepage": "https://gitcode.com/gh_mirrors/pr/printf", + "members": [ + "Gitcode-Assistant", + "coco_gitcode", + "gitshumei" + ], + "forks_count": 0, + "stargazers_count": 8, + "relation": "", + "permission": { + "push": false + }, + "internal": false, + "open_issues_count": 0, + "has_issue": false, + "watchers_count": 0, + "enterprise": { + "id": 2192766, + "path": "pr", + "html_url": "https://gitcode.com/pr", + "type": "enterprise" + }, + "default_branch": "master", + "fork": false, + "pushed_at": "2024-08-10T00:28:30.350+08:00", + "owner": { + "id": "69090", + "login": "coco_gitcode", + "name": "GitCode优质项目", + "type": "User" + }, + "issue_template_source": "project", + "private": false, + "public": true + } } } } @@ -33749,115 +36852,58 @@ } }, "security": [] - }, - "delete": { - "summary": "移除项目成员", + } + }, + "/oauth/authorize": { + "get": { + "summary": "认证接口", "deprecated": false, "description": "", - "operationId": "delete_api_v5_repos_{owner}_{repo}_collaborators_{username}", + "operationId": "get_oauth_authorize?client_id={client_id}&redirect_uri={redirect_uri}&response_type=code&scope={scope}&state={state}", "tags": [ - "Member" + "Oauth2.0" ], "parameters": [ { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "username", - "in": "path", - "description": "用户名(username/login)", + "name": "client_id", + "in": "query", + "description": "", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "access_token", + "name": "redirect_uri", "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - }, - "headers": {} - } - }, - "security": [] - }, - "get": { - "summary": "判断用户是否为仓库成员", - "deprecated": false, - "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_collaborators_{username}", - "tags": [ - "Member" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", + "name": "response_type", + "in": "query", + "description": "", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "username", - "in": "path", - "description": "用户名(username/login)", + "name": "scope", + "in": "query", + "description": "", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "access_token", + "name": "state", "in": "query", - "description": "用户授权码", + "description": "", "required": true, "schema": { "type": "string" @@ -33866,19 +36912,12 @@ ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "example": { - "message": "404 Not Found" + "properties": {} } } }, @@ -33888,20 +36927,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/collaborators": { - "get": { - "summary": "获取仓库的所有成员", + "/oauth/token": { + "post": { + "summary": "获取或刷新授权 Token 接口", "deprecated": false, - "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_collaborators", + "description": "## 基本信息\n- 请求路径: `/oauth/token`\n- 请求方法: POST\n- 接口说明: 用于获取或刷新访问令牌(access_token)的统一接口\n\n## 请求参数\n\n### Query 参数\n\n| 参数名 | 必填 | 类型 | 说明 |\n|--------|------|------|------|\n| grant_type | 是 | string | 授权类型。可选值:
- `authorization_code`: 授权码模式,用于获取新token
- `refresh_token`: 刷新token模式,用于刷新已有token |\n| code | 条件必填 | string | 授权码。当 grant_type=authorization_code 时必填 |\n| client_id | 条件必填 | string | 注册的客户端ID。当 grant_type=authorization_code 时必填 |\n| refresh_token | 条件必填 | string | 刷新令牌。当 grant_type=refresh_token 时必填 |\n\n### Body 参数\n\n| 参数名 | 必填 | 类型 | 说明 |\n|--------|------|------|------|\n| client_secret | 条件必填 | string | 注册的客户端密钥。当 grant_type=authorization_code 时必填 |\n\n## 使用场景\n\n1. **获取新的访问令牌**\n - 设置 grant_type=authorization_code\n - 提供 code、client_id 和 client_secret\n \n2. **刷新访问令牌**\n - 设置 grant_type=refresh_token\n - 提供 refresh_token\n\n## 示例\n\n### 获取新token\n```\nPOST /oauth/token?grant_type=authorization_code&code={code}&client_id={client_id}\nContent-Type: application/json\n\n{\n \"client_secret\": \"{client_secret}\"\n}\n```\n\n### 刷新token\n```\nPOST /oauth/token?grant_type=refresh_token&refresh_token={refresh_token}\n```", + "operationId": "post_oauth_token?grant_type=authorization_code&code={code}&client_id={client_id}&client_secret={client_secret}", "tags": [ - "Member" + "Oauth2.0" ], "parameters": [ { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(组织或个人的地址path)", + "name": "grant_type", + "in": "query", + "description": "授权码模式", "required": true, "example": "", "schema": { @@ -33909,164 +36948,98 @@ } }, { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, + "name": "code", + "in": "query", + "description": "授权码", + "required": false, "example": "", "schema": { "type": "string" } }, { - "name": "access_token", + "name": "client_id", "in": "query", - "description": "用户授权码", - "required": true, + "description": "注册的客户端 ID", + "required": false, + "example": "", "schema": { "type": "string" } }, { - "name": "page", + "name": "client_secret", "in": "query", - "description": "当前的页码:默认为 1", + "description": "注册的客户端密钥", "required": false, + "example": "", "schema": { - "type": "integer" + "type": "string" } }, { - "name": "per_page", + "name": "refresh_token", "in": "query", - "description": "每页的数量,最大为 100,默认 20", + "description": "刷新令牌,仅在 grant_type 为 refresh_token 时必传", "required": false, + "example": "", "schema": { - "type": "integer" + "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "client_secret": { + "type": "string", + "description": "注册的客户端密钥" + } + }, + "required": [ + "client_secret" + ] + }, + "example": { + "client_secret": "string" + } + } + } + }, "responses": { "200": { "description": "成功响应", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "username": { - "type": "string" - }, - "nick_name": { - "type": "null" - }, - "state": { - "type": "null" - }, - "avatar": { - "type": "null" - }, - "avatar_url": { - "type": "null" - }, - "email": { - "type": "null" - }, - "name_cn": { - "type": "null" - }, - "web_url": { - "type": "string" - }, - "access_level": { - "type": "null" - }, - "expires_at": { - "type": "null" - }, - "limited": { - "type": "null" - }, - "type": { - "type": "string" - }, - "last_owner": { - "type": "null" - }, - "is_current_source_member": { - "type": "null" - }, - "last_source_owner": { - "type": "null" - }, - "join_way": { - "type": "null" - }, - "source_name": { - "type": "null" - }, - "member_roles": { - "type": "null" - }, - "iam_id": { - "type": "null" - }, - "committer_system_from": { - "type": "null" - }, - "permissions": { - "type": "object", - "properties": { - "pull": { - "type": "null" - }, - "push": { - "type": "null" - }, - "admin": { - "type": "integer" - } - } - } + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "expires_in": { + "type": "integer" + }, + "refresh_token": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "created_at": { + "type": "string" } } }, "example": { - "id": "708", - "name": "Lzm_0916", - "username": "Lzm_0916", - "nick_name": null, - "state": null, - "avatar": null, - "avatar_url": null, - "email": null, - "name_cn": null, - "web_url": "https://test.gitcode.net/Lzm_0916", - "access_level": null, - "expires_at": null, - "limited": null, - "type": "ProjectMember", - "last_owner": null, - "is_current_source_member": null, - "last_source_owner": null, - "join_way": null, - "source_name": null, - "member_roles": null, - "iam_id": null, - "committer_system_from": null, - "permissions": { - "pull": null, - "push": null, - "admin": true - } + "access_token": "eyPZPVNfsibj9tap_ibj3t3p", + "expires_in": 1296000, + "refresh_token": "b77ced3aee884348852160deab3697a1", + "scope": "all_user all_key all_groups all_projects all_pr all_issue all_note all_hook all_repository", + "created_at": "2024-04-20T09:07:59.889Z" } } }, @@ -34076,14 +37049,14 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/collaborators/{username}/permission": { + "/api/v5/repos/{owner}/{repo}/releases/tags/{tag}": { "get": { - "summary": "查看仓库成员的权限", + "summary": "根据Tag名称获取仓库的Release", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_collaborators_{username}_permission", + "operationId": "get_api_v5_repos_{owner}_{repo}_releases_tags_{tag}", "tags": [ - "Member" + "Release" ], "parameters": [ { @@ -34107,9 +37080,9 @@ } }, { - "name": "username", + "name": "tag", "in": "path", - "description": "用户名(username/login)", + "description": "Tag 名称", "required": true, "example": "", "schema": { @@ -34120,7 +37093,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } @@ -34134,90 +37107,134 @@ "schema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "username": { - "type": "string" - }, - "nick_name": { - "type": "string" - }, - "state": { - "type": "string" - }, - "email": { - "type": "string" - }, - "web_url": { - "type": "string" - }, - "access_level": { - "type": "integer" - }, - "type": { + "tag_name": { "type": "string" }, - "join_way": { + "target_commitish": { "type": "string" }, - "source_name": { - "type": "string" + "prerelease": { + "type": "boolean" }, - "role_name": { + "name": { "type": "string" }, - "role_name_cn": { + "body": { "type": "string" }, - "permissions": { + "author": { "type": "object", "properties": { - "admin": { - "type": "boolean" + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" } }, "required": [ - "admin" + "id", + "login", + "name", + "avatar_url", + "html_url", + "type", + "url" ] }, - "object_id": { + "created_at": { "type": "string" }, - "permission": { - "type": "string" + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "browser_download_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "id": { + "type": "number" + } + }, + "required": [ + "browser_download_url", + "name", + "type" + ] + } }, - "login": { + "release_status": { "type": "string" } }, "required": [ - "id", + "tag_name", + "target_commitish", + "prerelease", "name", - "username", - "nick_name", - "state", - "email", - "web_url", - "access_level", - "type", - "join_way", - "source_name", - "role_name", - "role_name_cn", - "permissions", - "object_id", - "permission", - "login" + "body", + "author", + "created_at", + "assets", + "release_status" ] }, "example": { - "id": 268, - "login": "dengmengmian", - "permission": "admin" + "tag_name": "v1.0.217", + "target_commitish": "930401b0dd58a809fce34da091b8aa3d6083cb33", + "prerelease": false, + "name": "learn serde", + "body": "learn serde 描述", + "author": { + "id": "26593", + "login": "fenglonghui", + "name": "龙辉", + "avatar_url": "https://cdn-img.gitcode.com/de/af/61d5ea0ffc926181d235ba5a66f58dc51734500a1eda9b0d429d71300c20a149.png?time=1732777805505", + "html_url": "https://gitcode.com/fenglonghui", + "type": "User", + "url": "https://api.gitcode.com/api/v5/users/fenglonghui" + }, + "created_at": "2025-01-16T19:58:07+08:00", + "assets": [ + { + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.zip", + "name": "serde-v1.0.217.zip" + }, + { + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.gz", + "name": "serde-v1.0.217.tar.gz" + }, + { + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.bz2", + "name": "serde-v1.0.217.tar.bz2" + }, + { + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar", + "name": "serde-v1.0.217.tar" + } + ] } } }, @@ -34227,20 +37244,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/collaborators/self-permission": { - "get": { - "summary": "查看当前成员仓库的权限点", + "/api/v5/repos/{owner}/{repo}/releases/{tag}": { + "patch": { + "summary": "更新仓库Release", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_collaborators_self-permission", + "operationId": "patch-api-v-5-repos-owner-repo-releases-tag", "tags": [ - "Member" + "Release" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -34257,16 +37274,65 @@ "type": "string" } }, + { + "name": "tag", + "in": "path", + "description": "Tag 名称", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, { "name": "access_token", "in": "query", "description": "用户授权码", "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "Content-Type", + "in": "header", + "description": "", + "required": false, + "example": "application/json", "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Release 名称" + }, + "body": { + "type": "string", + "description": "Release 描述\t" + }, + "release_status": { + "type": "string", + "description": "Release状态。pre(预发布版本),latest(最新版本)" + } + }, + "required": [ + "name", + "body" + ] + }, + "example": "" + } + } + }, "responses": { "200": { "description": "", @@ -34275,660 +37341,297 @@ "schema": { "type": "object", "properties": { - "role_info": { - "type": "object", - "properties": { - "role_uuid": { - "type": "string", - "description": "角色id" - }, - "name": { - "type": "string", - "description": "角色名称" - }, - "cn_name": { - "type": "string", - "description": "角色中文名称" - }, - "roles_type": { - "type": "integer", - "description": "角色类型" - }, - "access_level": { - "type": "integer", - "description": "角色等级" - } - }, - "required": [ - "role_uuid", - "name", - "cn_name", - "roles_type", - "access_level" - ], - "description": "用户角色" - }, - "resource_trees": { - "type": "array", - "items": { - "type": "object", - "properties": { - "resource_id": { - "type": "integer", - "description": "资源id" - }, - "name": { - "type": "string", - "description": "资源名称" - }, - "cn_name": { - "type": "string", - "description": "资源中文名称" - }, - "scope": { - "type": "string", - "description": "资源标识" - }, - "actions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "permission_id": { - "type": "integer", - "description": "权限点 id" - }, - "action": { - "type": "string", - "description": "权限点" - }, - "name": { - "type": "string", - "description": "权限点名称" - }, - "cn_name": { - "type": "string", - "description": "权限点中文名称" - }, - "selected": { - "type": "boolean", - "description": "是否拥有" - } - }, - "required": [ - "permission_id", - "action", - "name", - "cn_name", - "selected" - ] - }, - "description": "权限点" - }, - "path": { - "type": "string", - "description": "权限路径" - }, - "is_own": { - "type": "integer" - }, - "order_num": { - "type": "integer", - "description": "排序字段" - } - }, - "required": [ - "resource_id", - "name", - "cn_name", - "scope", - "actions", - "path", - "is_own", - "order_num" - ] - }, - "description": "用户权限矩阵树" - } - }, - "required": [ - "role_info", - "resource_trees" - ] - }, - "example": { - "role_info": { - "role_uuid": "45a9-276d8e546f1b05f9f98ce1ffdc6", - "name": "Owner", - "cn_name": "管理员", - "roles_type": 1, - "access_level": 50 - }, - "resource_trees": [ - { - "resource_id": 2, - "name": "repo", - "cn_name": "项目", - "scope": "repo", - "actions": [ - { - "permission_id": 5, - "action": "fork", - "name": "fork", - "cn_name": "fork", - "selected": true - }, - { - "permission_id": 6, - "action": "update", - "name": "update", - "cn_name": "更新", - "selected": true - }, - { - "permission_id": 7, - "action": "delete", - "name": "delete", - "cn_name": "删除", - "selected": true - }, - { - "permission_id": 8, - "action": "setting", - "name": "setting", - "cn_name": "设置", - "selected": true - }, - { - "permission_id": 9, - "action": "archive", - "name": "archive", - "cn_name": "归档", - "selected": true - }, - { - "permission_id": 10, - "action": "transfer", - "name": "transfer", - "cn_name": "转移", - "selected": true - } - ] - }, - { - "resource_id": 4, - "name": "code", - "cn_name": "代码", - "scope": "code", - "actions": [ - { - "permission_id": 14, - "action": "push", - "name": "push", - "cn_name": "推送", - "selected": true - }, - { - "permission_id": 15, - "action": "download", - "name": "download", - "cn_name": "下载", - "selected": true - } - ] - }, - { - "resource_id": 14, - "name": "wiki", - "cn_name": "Wiki", - "scope": "wiki", - "actions": [ - { - "permission_id": 48, - "action": "push", - "name": "push", - "cn_name": "推送", - "selected": true - }, - { - "permission_id": 49, - "action": "download", - "name": "download", - "cn_name": "下载", - "selected": true - } - ] - }, - { - "resource_id": 5, - "name": "member", - "cn_name": "成员", - "scope": "member", - "actions": [ - { - "permission_id": 16, - "action": "create", - "name": "create", - "cn_name": "邀请", - "selected": true - }, - { - "permission_id": 17, - "action": "update", - "name": "update", - "cn_name": "更新", - "selected": true - }, - { - "permission_id": 18, - "action": "delete", - "name": "delete", - "cn_name": "移除", - "selected": true - } - ] - }, - { - "resource_id": 6, - "name": "issue", - "cn_name": "Issue", - "scope": "issue", - "actions": [ - { - "permission_id": 19, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true - }, - { - "permission_id": 20, - "action": "update", - "name": "update", - "cn_name": "更新", - "selected": true - }, - { - "permission_id": 22, - "action": "reopen", - "name": "reopen", - "cn_name": "关闭/重开", - "selected": true - }, - { - "permission_id": 23, - "action": "pin", - "name": "pin", - "cn_name": "置顶", - "selected": true - }, - { - "permission_id": 24, - "action": "lock", - "name": "lock", - "cn_name": "锁定", - "selected": true - }, - { - "permission_id": 11, - "action": "delete", - "name": "delete", - "cn_name": "删除", - "selected": true - } - ] - }, - { - "resource_id": 7, - "name": "label", - "cn_name": "Label", - "scope": "label", - "actions": [ - { - "permission_id": 25, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true - }, - { - "permission_id": 26, - "action": "update", - "name": "update", - "cn_name": "更新", - "selected": true - }, - { - "permission_id": 27, - "action": "delete", - "name": "delete", - "cn_name": "删除", - "selected": true - } - ] + "tag_name": { + "type": "string" }, - { - "resource_id": 8, - "name": "milestone", - "cn_name": "里程碑", - "scope": "milestone", - "actions": [ - { - "permission_id": 28, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true - }, - { - "permission_id": 29, - "action": "update", - "name": "update", - "cn_name": "更新", - "selected": true - }, - { - "permission_id": 30, - "action": "delete", - "name": "delete", - "cn_name": "删除", - "selected": true - } - ] + "target_commitish": { + "type": "string" }, - { - "resource_id": 9, - "name": "branch", - "cn_name": "分支", - "scope": "branch", - "actions": [ - { - "permission_id": 31, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true - }, - { - "permission_id": 32, - "action": "delete", - "name": "delete", - "cn_name": "删除", - "selected": true - } - ] + "prerelease": { + "type": "boolean" }, - { - "resource_id": 10, - "name": "tag", - "cn_name": "Tag", - "scope": "tag", - "actions": [ - { - "permission_id": 33, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true - }, - { - "permission_id": 34, - "action": "delete", - "name": "delete", - "cn_name": "删除", - "selected": true - } - ] + "name": { + "type": "string" }, - { - "resource_id": 12, - "name": "pr", - "cn_name": "PullRequest", - "scope": "pr", - "actions": [ - { - "permission_id": 38, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true - }, - { - "permission_id": 39, - "action": "update", - "name": "update", - "cn_name": "更新", - "selected": true + "body": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - { - "permission_id": 40, - "action": "review", - "name": "review", - "cn_name": "评审", - "selected": true + "login": { + "type": "string" }, - { - "permission_id": 41, - "action": "approve", - "name": "approve", - "cn_name": "审核", - "selected": true + "name": { + "type": "string" }, - { - "permission_id": 42, - "action": "merge", - "name": "merge", - "cn_name": "合并", - "selected": true + "avatar_url": { + "type": "string" }, - { - "permission_id": 43, - "action": "close", - "name": "close", - "cn_name": "关闭", - "selected": true + "html_url": { + "type": "string" }, - { - "permission_id": 44, - "action": "reopen", - "name": "reopen", - "cn_name": "重开", - "selected": true + "type": { + "type": "string" }, - { - "permission_id": 47, - "action": "test", - "name": "test", - "cn_name": "测试", - "selected": true + "url": { + "type": "string" } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "type", + "url" ] }, - { - "resource_id": 13, - "name": "note", - "cn_name": "评论", - "scope": "note", - "actions": [ - { - "permission_id": 45, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true + "created_at": { + "type": "string" + }, + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "browser_download_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } }, - { - "permission_id": 46, - "action": "resolve", - "name": "resolve", - "cn_name": "解决", - "selected": true - } - ] + "required": [ + "browser_download_url", + "name", + "type" + ] + } }, + "release_status": { + "type": "string" + } + }, + "required": [ + "tag_name", + "target_commitish", + "prerelease", + "name", + "body", + "author", + "created_at", + "assets", + "release_status" + ] + }, + "example": { + "tag_name": "v1.0.217", + "target_commitish": "930401b0dd58a809fce34da091b8aa3d6083cb33", + "prerelease": false, + "name": "release1 名称", + "body": "release1 描述", + "author": { + "id": "26593", + "login": "fenglonghui", + "name": "龙辉", + "avatar_url": "https://cdn-img.gitcode.com/de/af/61d5ea0ffc926181d235ba5a66f58dc51734500a1eda9b0d429d71300c20a149.png?time=1732777805505", + "html_url": "https://gitcode.com/fenglonghui", + "type": "User", + "url": "https://api.gitcode.com/api/v5/users/fenglonghui" + }, + "created_at": "2025-01-16T19:58:07+08:00", + "assets": [ { - "resource_id": 0, - "name": "pipeline", - "cn_name": "流水线", - "scope": "pipeline", - "path": "/gitcode/repo/pipeline/*", - "is_own": 1, - "order_num": 10, - "actions": [ - { - "permission_id": 0, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true - }, - { - "permission_id": 0, - "action": "update", - "name": "update", - "cn_name": "更新", - "selected": true - }, - { - "permission_id": 0, - "action": "delete", - "name": "delete", - "cn_name": "删除(构建记录)", - "selected": true - }, - { - "permission_id": 0, - "action": "run", - "name": "run", - "cn_name": "运行", - "selected": true - }, - { - "permission_id": 0, - "action": "rerun", - "name": "rerun", - "cn_name": "重新运行", - "selected": true - } - ] + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.zip", + "name": "serde-v1.0.217.zip" }, { - "resource_id": 0, - "name": "discussion", - "cn_name": "讨论", - "scope": "discussion", - "path": "/gitcode/repo/discussion/*", - "is_own": 1, - "order_num": 15, - "actions": [ - { - "permission_id": 0, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true - }, - { - "permission_id": 0, - "action": "update", - "name": "update", - "cn_name": "更新", - "selected": true + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.gz", + "name": "serde-v1.0.217.tar.gz" + }, + { + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.bz2", + "name": "serde-v1.0.217.tar.bz2" + }, + { + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar", + "name": "serde-v1.0.217.tar" + } + ] + } + } + }, + "headers": {} + } + }, + "security": [] + }, + "get": { + "summary": "获取仓库的单个Releases", + "deprecated": false, + "description": "", + "operationId": "get_api_v5_repos_{owner}_{repo}_releases_{tag}", + "tags": [ + "Release" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "path", + "description": "Tag 名称", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "temp_download_url", + "in": "query", + "description": "是否返回源码包和附件临时下载地址,默认false", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tag_name": { + "type": "string" + }, + "target_commitish": { + "type": "string" + }, + "prerelease": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - { - "permission_id": 0, - "action": "lock", - "name": "lock", - "cn_name": "锁定", - "selected": true + "login": { + "type": "string" }, - { - "permission_id": 0, - "action": "pin", - "name": "pin", - "cn_name": "置顶", - "selected": true + "name": { + "type": "string" }, - { - "permission_id": 0, - "action": "close", - "name": "close", - "cn_name": "关闭/重开", - "selected": true - } - ] - }, - { - "resource_id": 0, - "name": "kanban", - "cn_name": "看板", - "scope": "kanban", - "path": "/gitcode/repo/kanban/*", - "is_own": 1, - "order_num": 16, - "actions": [ - { - "permission_id": 0, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true + "avatar_url": { + "type": "string" }, - { - "permission_id": 0, - "action": "update", - "name": "update", - "cn_name": "更新", - "selected": true + "html_url": { + "type": "string" }, - { - "permission_id": 0, - "action": "delete", - "name": "delete", - "cn_name": "删除", - "selected": true + "type": { + "type": "string" }, - { - "permission_id": 0, - "action": "close", - "name": "close", - "cn_name": "关闭/重开", - "selected": true + "url": { + "type": "string" } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "type", + "url" ] }, - { - "resource_id": 0, - "name": "collection", - "cn_name": "合集", - "scope": "collection", - "path": "/gitcode/repo/collection/*", - "is_own": 1, - "order_num": 18, - "actions": [ - { - "permission_id": 0, - "action": "create", - "name": "create", - "cn_name": "创建", - "selected": true - }, - { - "permission_id": 0, - "action": "update", - "name": "update", - "cn_name": "更新", - "selected": true + "created_at": { + "type": "string" + }, + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "browser_download_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "id": { + "type": "number" + } }, - { - "permission_id": 0, - "action": "delete", - "name": "delete", - "cn_name": "删除", - "selected": true - } - ] + "required": [ + "browser_download_url", + "name", + "type" + ] + } + }, + "release_status": { + "type": "string" } + }, + "required": [ + "tag_name", + "target_commitish", + "prerelease", + "name", + "body", + "author", + "created_at", + "assets", + "release_status" ] } } @@ -34939,14 +37642,14 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/hooks": { + "/api/v5/repos/{owner}/{repo}/releases": { "get": { - "summary": "列出仓库的WebHooks", + "summary": "获取仓库的所有Releases", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_hooks", + "operationId": "get_api_v5_repos_{owner}_{repo}_releases", "tags": [ - "Webhooks" + "Release" ], "parameters": [ { @@ -34972,8 +37675,17 @@ { "name": "access_token", "in": "query", - "description": "用户授权码", - "required": true, + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "direction", + "in": "query", + "description": "可选。升序/降序。不填为升序", + "required": false, "schema": { "type": "string" } @@ -34990,7 +37702,7 @@ { "name": "per_page", "in": "query", - "description": "每页的数量,最大为 100,默认 20", + "description": "每页的数量,最大为100,默认 20", "required": false, "schema": { "type": "integer" @@ -35007,62 +37719,135 @@ "items": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "password": { + "tag_name": { "type": "string" }, - "result": { + "target_commitish": { "type": "string" }, - "project_id": { - "type": "integer" - }, - "result_code": { - "type": "integer" - }, - "push_events": { - "type": "integer" - }, - "tag_push_events": { - "type": "integer" + "prerelease": { + "type": "boolean" }, - "issues_events": { - "type": "integer" + "name": { + "type": "string" }, - "note_events": { - "type": "integer" + "body": { + "type": "string" }, - "merge_requests_events": { - "type": "integer" + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "type", + "url" + ] }, "created_at": { "type": "string" }, - "active": { - "type": "boolean", - "description": "是否激活" + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "browser_download_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "id": { + "type": "number" + } + }, + "required": [ + "browser_download_url", + "name", + "type" + ] + } + }, + "release_status": { + "type": "string" } - } + }, + "required": [ + "tag_name", + "target_commitish", + "prerelease", + "name", + "body", + "author", + "created_at", + "assets", + "release_status" + ] } }, "example": { - "id": 9523, - "url": "http://duxwsqdkyx.cu/pxssss", - "password": "123445", - "result": "not found", - "project_id": 282463, - "result_code": 503, - "push_events": false, - "tag_push_events": false, - "issues_events": true, - "note_events": false, - "merge_requests_events": true, - "created_at": "2024-09-18T17:51:44+08:00" + "tag_name": "v1.0.217", + "target_commitish": "930401b0dd58a809fce34da091b8aa3d6083cb33", + "prerelease": false, + "name": "release1 名称", + "body": "release1 描述", + "author": { + "id": "26593", + "login": "fenglonghui", + "name": "龙辉", + "avatar_url": "https://cdn-img.gitcode.com/de/af/61d5ea0ffc926181d235ba5a66f58dc51734500a1eda9b0d429d71300c20a149.png?time=1732777805505", + "html_url": "https://gitcode.com/fenglonghui", + "type": "User", + "url": "https://api.gitcode.com/api/v5/users/fenglonghui" + }, + "created_at": "2025-01-16T19:58:07+08:00", + "assets": [ + { + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.zip", + "name": "serde-v1.0.217.zip" + }, + { + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.gz", + "name": "serde-v1.0.217.tar.gz" + }, + { + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.bz2", + "name": "serde-v1.0.217.tar.bz2" + }, + { + "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar", + "name": "serde-v1.0.217.tar" + } + ] } } }, @@ -35072,12 +37857,12 @@ "security": [] }, "post": { - "summary": "创建一个仓库的WebHooks", + "summary": "创建仓库Release", "deprecated": false, "description": "", - "operationId": "post_api_v5_repos_{owner}_{repo}_hooks", + "operationId": "post_api_v5_repos_{owner}_{repo}_releases", "tags": [ - "Webhooks" + "Release" ], "parameters": [ { @@ -35093,7 +37878,7 @@ { "name": "repo", "in": "path", - "description": "仓库路径(path)", + "description": "仓库路径", "required": true, "example": "", "schema": { @@ -35116,41 +37901,31 @@ "schema": { "type": "object", "properties": { - "url": { + "tag_name": { "type": "string", - "description": "远程HTTP URL" - }, - "encryption_type": { - "type": "integer", - "description": "加密类型: 0: 密码, 1: 签名密钥" + "description": "tag名称" }, - "password": { + "name": { "type": "string", - "description": "请求URL时会带上该密码,防止URL被恶意请求" - }, - "push_events": { - "type": "boolean", - "description": "Push代码到仓库" - }, - "tag_push_events": { - "type": "boolean", - "description": "提交Tag到仓库" + "description": "release名称" }, - "issues_events": { - "type": "boolean", - "description": "创建/关闭Issue" + "body": { + "type": "string", + "description": "release描述" }, - "note_events": { - "type": "boolean", - "description": "评论了Issue/代码等等" + "target_commitish": { + "type": "string", + "description": "分支名称或者commit SHA,如果tag不存在,需要新建tag则传入该参数,如果不传入该参数,则为默认分支的最新提交" }, - "merge_requests_events": { - "type": "boolean", - "description": "合并请求和合并后" + "release_status": { + "type": "string", + "description": "Release状态。pre(预发布版本),latest(最新版本)" } }, "required": [ - "url" + "tag_name", + "name", + "body" ] }, "example": "" @@ -35159,63 +37934,102 @@ }, "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "url": { + "tag_name": { "type": "string" }, - "password": { + "target_commitish": { "type": "string" }, - "result": { - "type": "null" - }, - "project_id": { - "type": "integer" - }, - "result_code": { - "type": "integer" + "prerelease": { + "type": "boolean" }, - "push_events": { - "type": "integer" + "name": { + "type": "string" }, - "tag_push_events": { - "type": "integer" + "body": { + "type": "string" }, - "issues_events": { - "type": "integer" + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "type", + "url" + ] }, - "note_events": { - "type": "integer" + "created_at": { + "type": "string" }, - "merge_requests_events": { - "type": "integer" + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "browser_download_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "browser_download_url", + "name", + "type" + ] + } }, - "created_at": { + "release_status": { "type": "string" } - } - }, - "example": { - "id": 9529, - "url": "http://duxwsqdkyx.cu/pxddddd", - "password": "123445", - "result": null, - "project_id": 282463, - "result_code": 0, - "push_events": false, - "tag_push_events": false, - "issues_events": true, - "note_events": false, - "merge_requests_events": true, - "created_at": "2024-09-26T16:13:27+08:00" + }, + "required": [ + "tag_name", + "target_commitish", + "prerelease", + "name", + "body", + "author", + "created_at", + "assets", + "release_status" + ] } } }, @@ -35225,140 +38039,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/hooks/{id}": { + "/api/v5/repos/{owner}/{repo}/releases/latest": { "get": { - "summary": "获取仓库单个WebHook", - "deprecated": false, - "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_hooks_{id}", - "tags": [ - "Webhooks" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "id", - "in": "path", - "description": "Webhook的ID", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "成功响应", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "password": { - "type": "string" - }, - "result": { - "type": "null" - }, - "project_id": { - "type": "integer" - }, - "result_code": { - "type": "integer" - }, - "push_events": { - "type": "integer" - }, - "tag_push_events": { - "type": "integer" - }, - "issues_events": { - "type": "integer" - }, - "note_events": { - "type": "integer" - }, - "merge_requests_events": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "active": { - "type": "boolean", - "description": "是否激活" - } - } - }, - "example": { - "id": 9529, - "url": "http://duxwsqdkyx.cu/pxddddd", - "password": "123445", - "result": null, - "project_id": 282463, - "result_code": 0, - "push_events": false, - "tag_push_events": false, - "issues_events": true, - "note_events": false, - "merge_requests_events": true, - "created_at": "2024-09-26T16:13:27+08:00" - } - } - }, - "headers": {} - } - }, - "security": [] - }, - "patch": { - "summary": "更新一个仓库WebHook", + "summary": "获取仓库的最新的Release", "deprecated": false, "description": "", - "operationId": "patch_api_v5_repos_{owner}_{repo}_hooks_{id}", + "operationId": "get_api_v5_repos_{owner}_{repo}_releases_latest", "tags": [ - "Webhooks" + "Release" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -35372,131 +38066,164 @@ "required": true, "example": "", "schema": { - "type": "string" - } - }, - { - "name": "id", - "in": "path", - "description": "Webhook的ID", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "远程HTTP URL" - }, - "encryption_type": { - "type": "integer", - "description": "加密类型: 0: 密码, 1: 签名密钥" - }, - "password": { - "type": "string", - "description": "请求URL时会带上该密码,防止URL被恶意请求" - }, - "push_events": { - "type": "boolean", - "description": "Push代码到仓库" - }, - "tag_push_events": { - "type": "boolean", - "description": "提交Tag到仓库" - }, - "issues_events": { - "type": "boolean", - "description": "创建/关闭Issue" - }, - "note_events": { - "type": "boolean", - "description": "评论了Issue/代码等等" - }, - "merge_requests_events": { - "type": "boolean", - "description": "合并请求和合并后" - } - }, - "required": [ - "url" - ] - }, - "example": "" + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "类型。updated(最后更新的),latest(最新的)", + "required": false, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "url": { + "tag_name": { "type": "string" }, - "password": { + "target_commitish": { "type": "string" }, - "result": { - "type": "null" - }, - "project_id": { - "type": "integer" - }, - "result_code": { - "type": "integer" + "prerelease": { + "type": "boolean" }, - "push_events": { - "type": "integer" + "name": { + "type": "string" }, - "tag_push_events": { - "type": "integer" + "body": { + "type": "string" }, - "issues_events": { - "type": "integer" + "author": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "type", + "url" + ] }, - "note_events": { - "type": "integer" + "created_at": { + "type": "string" }, - "merge_requests_events": { - "type": "integer" + "assets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "browser_download_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "id": { + "type": "number" + } + }, + "required": [ + "browser_download_url", + "name", + "type" + ] + } }, - "created_at": { + "release_status": { "type": "string" } - } + }, + "required": [ + "tag_name", + "target_commitish", + "prerelease", + "name", + "body", + "author", + "created_at", + "assets", + "release_status" + ] }, "example": { - "url": "http://duxwsqdkyx.cu/pxddddd", - "password": "123445", - "result": null, - "project_id": 282463, - "result_code": 0, - "push_events": false, - "tag_push_events": false, - "issues_events": true, - "note_events": false, - "merge_requests_events": true, - "created_at": "2024-09-26T16:13:27+08:00" + "tag_name": "V0.0.1", + "target_commitish": "b33d10690347a36ccbf7464fe16466c1409f9533", + "prerelease": false, + "name": "V0.0.1", + "body": "V0.0.1", + "author": { + "id": "645", + "login": "yanfan", + "name": "殿前都点检", + "avatar_url": "https://gitcode-img.obs.cn-south-1.myhuaweicloud.com:443/df/ae/64d7f5ae52df30ea2b696064187dbf4871e29217a1a9de303bbc46f43dbb0dd6.png?time=1737363381562", + "html_url": "https://test.gitcode.net/yanfan", + "type": "User", + "url": "https://api-test.gitcode.net/api/v5/users/yanfan" + }, + "created_at": "2024-04-15T20:43:35+08:00", + "assets": [ + { + "browser_download_url": "https://test.gitcode.net/test_associate/YanF1/-/archive/V0.0.1/YanF1-V0.0.1.zip", + "name": "YanF1-V0.0.1.zip" + }, + { + "browser_download_url": "https://test.gitcode.net/test_associate/YanF1/-/archive/V0.0.1/YanF1-V0.0.1.tar.gz", + "name": "YanF1-V0.0.1.tar.gz" + }, + { + "browser_download_url": "https://test.gitcode.net/test_associate/YanF1/-/archive/V0.0.1/YanF1-V0.0.1.tar.bz2", + "name": "YanF1-V0.0.1.tar.bz2" + }, + { + "browser_download_url": "https://test.gitcode.net/test_associate/YanF1/-/archive/V0.0.1/YanF1-V0.0.1.tar", + "name": "YanF1-V0.0.1.tar" + } + ] } } }, @@ -35504,20 +38231,22 @@ } }, "security": [] - }, - "delete": { - "summary": "删除一个仓库WebHook", + } + }, + "/api/v5/repos/{owner}/{repo}/releases/{tag}/attach_files/{file_name}/download": { + "get": { + "summary": "下载仓库release附件", "deprecated": false, "description": "", - "operationId": "delete_api_v5_repos_{owner}_{repo}_hooks_{id}", + "operationId": "get_api_v5_repos_{owner}_{repo}_releases_attach_files_{file_name}_download", "tags": [ - "Webhooks" + "Release" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "仓库所属空间地址(企业、组织或个人的地址path)", "required": true, "example": "", "schema": { @@ -35535,9 +38264,19 @@ } }, { - "name": "id", + "name": "tag", "in": "path", - "description": "Webhook的ID", + "description": "标签名称", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "file_name", + "in": "path", + "description": "附件名称", "required": true, "example": "", "schema": { @@ -35548,7 +38287,8 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, + "example": "", "schema": { "type": "string" } @@ -35558,7 +38298,7 @@ "200": { "description": "", "content": { - "application/json": { + "*/*": { "schema": { "type": "object", "properties": {} @@ -35571,14 +38311,14 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/hooks/{id}/tests": { - "post": { - "summary": "测试WebHook是否发送成功", + "/api/v5/repos/{owner}/{repo}/releases/{tag}/upload_url": { + "get": { + "summary": "获取Release附件上传地址", "deprecated": false, "description": "", - "operationId": "post_api_v5_repos_{owner}_{repo}_hooks_{id}_tests", + "operationId": "get_api_v5_repos_{owner}_{repo}_releases_{tag}_upload_url", "tags": [ - "Webhooks" + "Release" ], "parameters": [ { @@ -35594,7 +38334,7 @@ { "name": "repo", "in": "path", - "description": "仓库路径(path)", + "description": "仓库路径", "required": true, "example": "", "schema": { @@ -35602,9 +38342,9 @@ } }, { - "name": "id", + "name": "tag", "in": "path", - "description": "Webhook的ID", + "description": "tag名称", "required": true, "example": "", "schema": { @@ -35619,6 +38359,15 @@ "schema": { "type": "string" } + }, + { + "name": "file_name", + "in": "query", + "description": "要上传的文件名称", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -35628,7 +38377,40 @@ "application/json": { "schema": { "type": "object", - "properties": {} + "properties": { + "url": { + "type": "string", + "description": "上传的地址,使用put请求" + }, + "headers": { + "type": "object", + "properties": { + "x-obs-meta-project-id": { + "type": "string" + }, + "x-obs-acl": { + "type": "string" + }, + "x-obs-callback": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + }, + "required": [ + "x-obs-meta-project-id", + "x-obs-acl", + "x-obs-callback", + "Content-Type" + ], + "description": "上传的请求需要携带的请求头" + } + }, + "required": [ + "url", + "headers" + ] } } }, @@ -35638,124 +38420,340 @@ "security": [] } }, - "/api/v5/search/users": { - "get": { - "summary": "搜索用户", + "/api/v5/chat/completions": { + "post": { + "summary": "send", "deprecated": false, "description": "", - "operationId": "get_api_v5_search_users", "tags": [ - "Search" + "AI hub" ], - "parameters": [ - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "当前的页码 最大为 100", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "per_page", - "in": "query", - "description": "每页的数量,最大为 50", - "required": false, - "schema": { - "type": "integer" + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSendStreamReq", + "description": "" + }, + "example": { + "temperature": 0.7, + "top_k": 50, + "top_p": 0.7, + "frequency_penalty": 1, + "messages": [ + { + "role": "user", + "content": "你好,你能帮我什么忙?" + } + ], + "model": "hf_mirrors/rohithsiddhartha/DeepSeek-R1-4bit", + "max_tokens": 4096 + } } - }, + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timeout": { + "type": "integer", + "description": "", + "format": "int64", + "nullable": true + }, + "handler": { + "description": "", + "$ref": "#/components/schemas/Handler", + "nullable": true + }, + "earlySendAttempts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataWithMediaType", + "description": "org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter.DataWithMediaType" + }, + "description": "" + }, + "complete": { + "type": "boolean", + "description": "" + }, + "failure": { + "description": "", + "$ref": "#/components/schemas/Throwable", + "nullable": true + }, + "sendFailed": { + "type": "boolean", + "description": "" + }, + "timeoutCallback": { + "$ref": "#/components/schemas/DefaultCallback", + "description": "" + }, + "errorCallback": { + "$ref": "#/components/schemas/ErrorCallback", + "description": "" + }, + "completionCallback": { + "$ref": "#/components/schemas/DefaultCallback", + "description": "" + } + } + }, + "example": { + "timeout": 0, + "handler": {}, + "earlySendAttempts": [ + { + "data": {}, + "mediaType": { + "type": "", + "subtype": "", + "parameters": { + "": "" + }, + "toStringValue": "", + "wildcardType": false, + "wildcardSubtype": false, + "concrete": false, + "subtypeSuffix": "", + "charset": { + "name": "", + "aliases": [ + "" + ], + "aliasSet": [ + "" + ], + "registered": false + }, + "qualityValue": 0 + } + } + ], + "complete": false, + "failure": { + "detailMessage": "", + "cause": { + "detailMessage": "", + "cause": {}, + "stackTrace": [ + { + "declaringClass": "", + "methodName": "", + "fileName": "", + "lineNumber": 0, + "className": "", + "nativeMethod": false + } + ], + "suppressedExceptions": [ + {} + ], + "message": "", + "localizedMessage": "", + "suppressed": [ + {} + ] + }, + "stackTrace": [ + { + "declaringClass": "", + "methodName": "", + "fileName": "", + "lineNumber": 0, + "className": "", + "nativeMethod": false + } + ], + "suppressedExceptions": [ + { + "detailMessage": "", + "cause": {}, + "stackTrace": [ + { + "declaringClass": "", + "methodName": "", + "fileName": "", + "lineNumber": 0, + "className": "", + "nativeMethod": false + } + ], + "suppressedExceptions": [ + {} + ], + "message": "", + "localizedMessage": "", + "suppressed": [ + {} + ] + } + ], + "message": "", + "localizedMessage": "", + "suppressed": [ + { + "detailMessage": "", + "cause": {}, + "stackTrace": [ + { + "declaringClass": "", + "methodName": "", + "fileName": "", + "lineNumber": 0, + "className": "", + "nativeMethod": false + } + ], + "suppressedExceptions": [ + { + "detailMessage": "", + "cause": {}, + "stackTrace": [ + { + "declaringClass": "", + "methodName": "", + "fileName": "", + "lineNumber": 0, + "className": "", + "nativeMethod": false + } + ], + "suppressedExceptions": [ + {} + ], + "message": "", + "localizedMessage": "", + "suppressed": [ + {} + ] + } + ], + "message": "", + "localizedMessage": "", + "suppressed": [ + {} + ] + } + ] + }, + "sendFailed": false, + "timeoutCallback": { + "delegate": {} + }, + "errorCallback": {}, + "completionCallback": { + "delegate": {} + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/similarity/": { + "post": { + "summary": "句子相似度", + "deprecated": false, + "description": "", + "operationId": "post-api-v-5-similarity", + "tags": [ + "AI hub" + ], + "parameters": [ { - "name": "q", - "in": "query", - "description": "搜索关键字", + "name": "Authorization", + "in": "header", + "description": "用户个人令牌", "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "排序字段,joined_at(注册时间),默认为最佳匹配", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "order", - "in": "query", - "description": "排序顺序 (默认:desc)", - "required": false, + "example": "", "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "type": "string", + "title": "模型名称" + }, + "inputs": { + "type": "object", + "properties": { + "source_sentence": { + "type": "string", + "title": "对比的源文本", + "description": "示例:\"That is a happy person\"" + }, + "sentences": { + "type": "array", + "items": { + "type": "string" + }, + "title": "对比的目标文本数组", + "description": "示例:[\"That is a happy dog\", \"That is a very happy person\"]" + } + }, + "required": [ + "source_sentence", + "sentences" + ], + "title": "输入参数" + } + }, + "required": [ + "model", + "inputs" + ] + }, + "example": { + "model": "text2vec-base-chinese", + "inputs": { + "source_sentence": "That is a happy person", + "sentences": [ + "That is a happy dog", + "That is a very happy person" + ] + } + } + } + } + }, "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { - "type": "object", - "properties": { - "avatar_url": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - } - } + "type": "number" } }, "examples": { "1": { "summary": "成功示例", - "value": { - "avatar_url": "https://cdn-img.gitcode.com/bb/bf/b1b0bff5bafab700603248485bc4a236061f84433741855a9ce8b0c42c8.png", - "created_at": "2024-11-15T00:00:00+08:00", - "html_url": "https://gitcode.com/wu_com", - "id": "25235036", - "login": "wu_com", - "name": "wu_com" - } + "value": 0.8220268487930298 }, "2": { "summary": "成功示例", - "value": { - "avatar_url": "https://cdn-img.gitcode.com/ad/ec/a8670853d9137e2c34efbc14904985a7cc5998929bfebca9ceb8626e170.png", - "created_at": "2024-11-15T00:00:00+08:00", - "html_url": "https://gitcode.com/wu5567488", - "id": "25153392", - "login": "wu5567488", - "name": "wu5567488" - } + "value": 0.9805881381034851 } } } @@ -35766,255 +38764,85 @@ "security": [] } }, - "/api/v5/search/issues": { - "get": { - "summary": "搜索 Issues", + "/api/v1/images/edits": { + "post": { + "summary": "图像生成图像", "deprecated": false, - "description": "", - "operationId": "get_api_v5_search_issues", + "description": "根据输入图片和提示词生成新图片,使用multipart/form-data格式上传图片。", + "operationId": "post-api-v-1-images-edits", "tags": [ - "Search" + "AI hub" ], "parameters": [ { - "name": "access_token", + "name": "model", "in": "query", - "description": "用户授权码", + "description": "模型名称", "required": true, "schema": { "type": "string" } }, { - "name": "page", - "in": "query", - "description": "当前的页码 最大为 100", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "per_page", - "in": "query", - "description": "每页的数量,最大为 50", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "q", + "name": "prompt", "in": "query", - "description": "搜索关键字", + "description": "提示词", "required": true, "schema": { "type": "string" } }, { - "name": "sort", - "in": "query", - "description": "排序字段,created_at(创建时间)、last_push_at(更新时间),默认为最佳匹配", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "order", - "in": "query", - "description": "排序顺序 (默认:desc)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "query", - "description": "仓库路径", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "description": "筛选指定状态的 issues, open(开启)、closed(完成)", - "required": false, + "name": "Authorization", + "in": "header", + "description": "用户个人令牌", + "required": true, + "example": "", "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "image": { + "type": "string", + "format": "binary", + "example": "" + } + }, + "required": [ + "image" + ] + }, + "example": { + "image": "" + } + } + } + }, "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "string" - }, - "state": { - "type": "string" - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "repository": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "full_name": { - "type": "string" - }, - "human_name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "owner": { - "type": "object", - "properties": { - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": {} - } - }, - "priority": { - "type": "integer" - }, - "comments": { - "type": "integer" - }, - "parent_id": { - "type": "integer" - } - } - } + "$ref": "#/components/schemas/ResponseEntityImageToImageResp" }, - "examples": { - "1": { - "summary": "成功示例", - "value": { - "id": 548499, - "html_url": "https://gitcode.com/youlai/vue3-element-admin/issues/1", - "number": "1", - "state": "open", - "title": "test", - "body": "test", - "repository": { - "id": 3771502, - "full_name": "youlai/vue3-element-admin", - "human_name": "有来开源组织 / vue3-element-admin", - "path": "vue3-element-admin", - "name": "vue3-element-admin", - "url": "https://gitcode.com/youlai/vue3-element-admin", - "owner": { - "avatar_url": "https://cdn-img.gitcode.com/fc/ae/3f96c31289ae838297c61f385af9c2e6357216a1906205f56d50f3e268319d8b.png?time=1724590827689", - "html_url": "https://gitcode.com/u013737132", - "id": "6553a045ac27540b6bfcb436", - "login": "u013737132", - "name": "有来技术", - "type": "User" - } - }, - "created_at": "2024-11-07T18:11:23+08:00", - "updated_at": "2024-11-07T18:11:23+08:00", - "labels": [], - "priority": 0, - "comments": 0, - "parent_id": 0 - } - }, - "2": { - "summary": "成功示例", - "value": { - "id": 518776, - "html_url": "https://gitcode.com/openUBMC-test/openubmc-ci/issues/4", - "number": "4", - "state": "open", - "title": "test_1", - "body": "11111", - "repository": { - "id": 4261097, - "full_name": "openUBMC-test/openubmc-ci", - "human_name": "openUBMC-test / openubmc-ci", - "path": "openubmc-ci", - "name": "openubmc-ci", - "url": "https://gitcode.com/openUBMC-test/openubmc-ci", - "owner": { - "avatar_url": "https://cdn-img.gitcode.com/fd/ab/256f0d7a9b2b771a883a9a2975f6bb8804dbcc53df334a63a508306f86fe6c2c.jpg", - "html_url": "https://gitcode.com/levi3053", - "id": "671af08b9a767f4c7b6b0681", - "login": "levi3053", - "name": "BellllllYu@N.L¡", - "type": "User" - } - }, - "created_at": "2024-11-01T14:12:21+08:00", - "updated_at": "2024-11-01T14:15:00+08:00", - "labels": [], - "priority": 0, - "comments": 2, - "parent_id": 0 + "example": { + "request_id": "", + "created": 0, + "data": [ + { + "b64_json": "", + "url": "" } - } + ], + "error": "" } } }, @@ -36024,377 +38852,382 @@ "security": [] } }, - "/api/v5/search/repositories": { - "get": { - "summary": "搜索仓库", + "/api/v5/audio/transcriptions": { + "post": { + "summary": "自动语音识别", "deprecated": false, "description": "", - "operationId": "get_api_v5_search_repositories", + "operationId": "post-api-v-1-audio-transcriptions", "tags": [ - "Search" + "AI hub" ], "parameters": [ { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "当前的页码 最大为 100", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "per_page", - "in": "query", - "description": "每页的数量,最大为 20", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "q", - "in": "query", - "description": "搜索关键字", + "name": "Authorization", + "in": "header", + "description": "用户个人令牌", "required": true, + "example": "", "schema": { "type": "string" } - }, - { - "name": "sort", - "in": "query", - "description": "排序字段,last_push_at(更新时间)、stars_count(收藏数)、forks_count(Fork 数),默认为最佳匹配", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "order", - "in": "query", - "description": "排序顺序 (默认:desc)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "owner", - "in": "query", - "description": "仓库所属空间地址(组织或个人的地址path)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "fork", - "in": "query", - "description": "是否搜索含 fork 的仓库,如果显示,受白名单限制,默认:否", - "required": false, - "schema": { - "type": "string" + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "format": "binary", + "type": "string", + "description": "音频文件 (支持 mp3, wav, m4a, flac, webm)", + "example": "" + }, + "model": { + "type": "string", + "description": "模型名称,默认为 openai/whisper-large-v3", + "example": "" + }, + "temperature": { + "description": "采样温度(0.0-1.0),默认为0.6", + "type": "string", + "example": "" + } + }, + "required": [ + "file", + "model" + ] + }, + "example": { + "file": "", + "model": "", + "temperature": "" + } } - }, + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "text": { + "type": "string", + "title": "文本" + } + }, + "required": [ + "text" + ] + }, + "example": { + "text": "早上好,今天天气很好,阳光明媚我打算去公园散步,然后喝一杯咖啡,开始一天的工作" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/detect/yolo": { + "post": { + "summary": "目标检测", + "deprecated": false, + "description": "使用YOLO模型对图片进行目标检测,识别图片中的物体", + "operationId": "post-api-v-5-detect-yolo", + "tags": [ + "AI hub" + ], + "parameters": [ { - "name": "language", - "in": "query", - "description": "筛选指定语言的仓库", - "required": false, + "name": "Authorization", + "in": "header", + "description": "用户个人令牌", + "required": true, + "example": "", "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "", + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "yolo11模型权重文件名称 (yolo11n.pt, yolo11s.pt, yolo11m.pt, yolo11l.pt, yolo11x.pt)", + "example": "yolo11n.pt" + }, + "source": { + "type": "string", + "description": "待检测图片base64编码字符串", + "example": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQXXXXXXX" + }, + "imgsz": { + "type": "integer", + "description": "输入图像的尺寸,有效范围是 32 - 1280 像素", + "minimum": 32, + "maximum": 1280, + "example": 640 + }, + "conf": { + "type": "number", + "description": "预测的置信度阈值,有效范围 0.01 - 1.0", + "minimum": 0.01, + "maximum": 1, + "example": 0.5 + }, + "iou": { + "type": "number", + "description": "交并比iou阈值,有效范围 0.0 - 0.95", + "minimum": 0, + "maximum": 0.95, + "example": 0.45 + } + }, + "required": [ + "model", + "source", + "imgsz", + "conf", + "iou" + ] + }, + "example": { + "source": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCADLAUADASIAAhEBAxEB/8QAHQAAAQQDAQEAAAAAAAAAAAAABwQFBggCAwkBAP/EAEEQAAIBAgUCBQEGAwYGAQUBAAECAwQRAAUGEiEHM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W1QUWviPV9YCpHvhZWMSTc4YawnDwFASmysrLEi+I9XVl74W1xO484YK8nY2FUZTVmtbtB5tiFZpWm7c4fM2YlmuffERzVj84eAoymLM6v1HnnEWzCqvc34w7ZkTubnEbzEmx5w9ImbMqu9+cRbMau1+cPOZMbtziKZgxJPOESJtr6rue+I7WT3Jw5ZiSAecMVUTzgQkdVPhqqJO4wpqSfnDdLhUJNKAynEazWIJMSPfEkk98R3NjeTCoTdicdPdMLVXzGpS6KbRKR3PucQhRdhg3ZQBHp2DaAtqcEWH+HAhCLPasV+bVdQCCjSELb3A4H9MJaNImqY/PJ8oG77e5Hvb64WpTxtlkchUFzNtJ+lsIQShO3jm3GBC//9k=", + "model": "yolo11n.pt", + "imgsz": 640, + "conf": 0.25, + "iou": 0.45 + } + } + } + }, "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "full_name": { - "type": "string" - }, - "human_name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "namespace": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "html_url": { - "type": "string" - } - } - }, - "path": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "status": { - "type": "string" - }, - "ssh_url_to_repo": { - "type": "string" - }, - "http_url_to_repo": { - "type": "string" - }, - "web_url": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "members": { - "type": "array", - "items": { - "type": "string" - } - }, - "forks_count": { - "type": "integer" - }, - "stargazers_count": { - "type": "integer" - }, - "relation": { - "type": "string" - }, - "permission": { - "type": "object", - "properties": { - "push": { - "type": "integer" - } - } - }, - "internal": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "has_issue": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "enterprise": { + "type": "object", + "properties": { + "images": { + "type": "array", + "items": { + "description": "com.gitcode.aihub.inference.entity.dto.ObjectDetectionResp.ImageResult", "type": "object", "properties": { - "id": { - "type": "integer" - }, - "path": { - "type": "string" + "results": { + "type": "array", + "items": { + "description": "com.gitcode.aihub.inference.entity.dto.ObjectDetectionResp.DetectionResult", + "type": "object", + "properties": { + "box": { + "description": "边界框坐标", + "type": "object", + "properties": { + "x1": { + "type": "number", + "description": "左上角x坐标", + "example": 14.55554 + }, + "x2": { + "type": "number", + "description": "右下角x坐标", + "example": 72.45978 + }, + "y1": { + "type": "number", + "description": "左上角y坐标", + "example": 116.72369 + }, + "y2": { + "type": "number", + "description": "右下角y坐标", + "example": 268.92963 + } + }, + "required": [ + "x1", + "x2", + "y1", + "y2" + ] + }, + "class": { + "type": "integer", + "description": "类别ID", + "example": 0 + }, + "confidence": { + "type": "number", + "description": "置信度", + "example": 0.83583 + }, + "name": { + "type": "string", + "description": "类别名称", + "example": "person" + } + }, + "required": [ + "box", + "confidence", + "name" + ] + }, + "description": "检测结果列表" }, - "html_url": { - "type": "string" + "shape": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "图片尺寸 [width, height]" }, - "type": { - "type": "string" + "speed": { + "description": "处理速度信息", + "type": "object", + "properties": { + "inference": { + "type": "number", + "description": "推理时间(ms)", + "example": 56.13449 + }, + "postprocess": { + "type": "number", + "description": "后处理时间(ms)", + "example": 0.05426 + }, + "preprocess": { + "type": "number", + "description": "预处理时间(ms)", + "example": 21.20275 + } + }, + "required": [ + "inference", + "postprocess", + "preprocess" + ] } - } - }, - "default_branch": { - "type": "string" - }, - "fork": { - "type": "integer" - }, - "pushed_at": { - "type": "string" + }, + "required": [ + "results", + "shape", + "speed" + ] }, - "owner": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" + "description": "检测结果图片列表" + }, + "metadata": { + "description": "元数据信息", + "type": "object", + "properties": { + "functionTimeAlive": { + "type": "number", + "description": "函数存活时间(ms)", + "example": 163779.863 + }, + "functionTimeCall": { + "type": "number", + "description": "函数调用时间(ms)", + "example": 0.57 + }, + "imageCount": { + "type": "integer", + "description": "图片数量", + "example": 1 + }, + "model": { + "type": "string", + "description": "模型名称", + "example": "yolo11n-cls.pt" + }, + "version": { + "description": "版本信息", + "type": "object", + "properties": { + "python": { + "type": "string", + "description": "Python版本", + "example": "3.11.14" + }, + "torch": { + "type": "string", + "description": "PyTorch版本", + "example": "2.9.1+cpu" + }, + "torchvision": { + "type": "string", + "description": "torchvision版本", + "example": "0.24.1+cpu" + }, + "ultralytics": { + "type": "string", + "description": "ultralytics版本", + "example": "8.3.228" + } }, - "type": { - "type": "string" - } + "required": [ + "python", + "ultralytics" + ] } }, - "issue_template_source": { - "type": "string" - }, - "private": { - "type": "integer" - }, - "public": { - "type": "integer" - } - } - } - }, - "examples": { - "1": { - "summary": "成功示例", - "value": { - "id": 1431191, - "full_name": "gh_mirrors/al/allure2", - "human_name": "GitHub 加速计划 / al / allure2", - "url": "https://api.gitcode.com/api/v5/repos/gh_mirrors/al/allure2", - "namespace": { - "id": 2192652, - "type": "enterprise", - "name": "al", - "path": "al", - "html_url": "https://gitcode.com/al" - }, - "path": "allure2", - "name": "allure2", - "description": "Allure Report is a flexible, lightweight multi-language test reporting tool. It provides clear graphical reports and allows everyone involved in the development process to extract the maximum of information from the everyday testing process", - "status": "开始", - "ssh_url_to_repo": "git@gitcode.com:gh_mirrors/al/allure2.git", - "http_url_to_repo": "https://gitcode.com/gh_mirrors/al/allure2.git", - "web_url": "https://gitcode.com/gh_mirrors/al/allure2", - "created_at": "2023-12-18T00:42:15.557+08:00", - "updated_at": "2024-11-05T10:54:59.948+08:00", - "homepage": "https://gitcode.com/gh_mirrors/al/allure2", - "members": [ - "Gitcode-Assistant", - "coco_gitcode", - "gitshumei" - ], - "forks_count": 0, - "stargazers_count": 9, - "relation": "", - "permission": { - "push": false - }, - "internal": false, - "open_issues_count": 0, - "has_issue": false, - "watchers_count": 4, - "enterprise": { - "id": 2192652, - "path": "al", - "html_url": "https://gitcode.com/al", - "type": "enterprise" - }, - "default_branch": "main", - "fork": false, - "pushed_at": "2024-08-06T23:34:38.476+08:00", - "owner": { - "id": "69090", - "login": "coco_gitcode", - "name": "GitCode优质项目", - "type": "User" - }, - "issue_template_source": "project", - "private": false, - "public": true + "required": [ + "version" + ] } }, - "2": { - "summary": "成功示例", - "value": { - "id": 1401745, - "full_name": "gh_mirrors/pr/printf", - "human_name": "GitHub 加速计划 / pr / printf", - "url": "https://api.gitcode.com/api/v5/repos/gh_mirrors/pr/printf", - "namespace": { - "id": 2192766, - "type": "enterprise", - "name": "pr", - "path": "pr", - "html_url": "https://gitcode.com/pr" - }, - "path": "printf", - "name": "printf", - "description": "Tiny, fast, non-dependent and fully loaded printf implementation for embedded systems. Extensive test suite passing.", - "status": "开始", - "ssh_url_to_repo": "git@gitcode.com:gh_mirrors/pr/printf.git", - "http_url_to_repo": "https://gitcode.com/gh_mirrors/pr/printf.git", - "web_url": "https://gitcode.com/gh_mirrors/pr/printf", - "created_at": "2023-12-16T20:28:57.687+08:00", - "updated_at": "2024-09-27T21:48:26.980+08:00", - "homepage": "https://gitcode.com/gh_mirrors/pr/printf", - "members": [ - "Gitcode-Assistant", - "coco_gitcode", - "gitshumei" - ], - "forks_count": 0, - "stargazers_count": 8, - "relation": "", - "permission": { - "push": false - }, - "internal": false, - "open_issues_count": 0, - "has_issue": false, - "watchers_count": 0, - "enterprise": { - "id": 2192766, - "path": "pr", - "html_url": "https://gitcode.com/pr", - "type": "enterprise" - }, - "default_branch": "master", - "fork": false, - "pushed_at": "2024-08-10T00:28:30.350+08:00", - "owner": { - "id": "69090", - "login": "coco_gitcode", - "name": "GitCode优质项目", - "type": "User" - }, - "issue_template_source": "project", - "private": false, - "public": true + "required": [ + "images", + "metadata" + ] + }, + "example": { + "images": [ + { + "results": [ + { + "box": { + "x1": 1.511962890625, + "x2": 263.31793212890625, + "y1": 0.378143310546875, + "y2": 200.42999267578125 + }, + "confidence": 0.6070891618728638, + "name": "person" + } + ], + "shape": [ + 203, + 320 + ], + "speed": { + "inference": 235.26057600975037, + "postprocess": 1.4520995318889618, + "preprocess": 3.9573051035404205 + } + } + ], + "metadata": { + "version": { + "python": "3.11.13", + "ultralytics": "8.3.231" } } } @@ -36406,62 +39239,72 @@ "security": [] } }, - "/oauth/authorize": { - "get": { - "summary": "认证接口", + "/api/v5/video/generate": { + "post": { + "summary": "图像生成视频(创建任务)", "deprecated": false, - "description": "", - "operationId": "get_oauth_authorize?client_id={client_id}&redirect_uri={redirect_uri}&response_type=code&scope={scope}&state={state}", + "description": "调用此接口创建视频生成任务,如果没有异常返回,可根据 requestId 进行异步视频结果查询。", + "operationId": "post-api-v-5-video-generate", "tags": [ - "OAuth2" + "AI hub" ], "parameters": [ { - "name": "client_id", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "redirect_uri", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "response_type", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "scope", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "description": "", + "name": "Authorization", + "in": "header", + "description": "用户个人令牌", "required": true, + "example": "", "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "img_url", + "model", + "prompt" + ], + "type": "object", + "properties": { + "img_url": { + "type": "string", + "description": "支持输入 Base64 或图片 URL", + "example": "https://cdn-static.gitcode.com/_nuxtaihub/chatexample_67.png" + }, + "model": { + "type": "string", + "description": "模型名称", + "example": "Wan2.2-I2V-A14B" + }, + "prompt": { + "type": "string", + "description": "提示词", + "example": "小猫在散步" + }, + "seed": { + "type": "integer", + "description": "随机种子,范围 0-2147483648", + "format": "int64", + "default": 0, + "example": 0 + } + }, + "description": "" + }, + "example": { + "model": "Wan2.2-I2V-A14B", + "prompt": "魔术师手中飞出漫天纸牌,掌心迸射炫彩光芒,无数彩色纸片与礼花随之洒落,缤纷闪耀。", + "img_url": "https://cdn-static.gitcode.com/_nuxtaihub/chatexample_67.png", + "seed": 0 + } + } + } + }, "responses": { "200": { "description": "", @@ -36469,7 +39312,21 @@ "application/json": { "schema": { "type": "object", - "properties": {} + "properties": { + "request_id": { + "type": "string", + "description": "请求ID" + }, + "status": { + "type": "string", + "description": "处理状态", + "example": "running" + }, + "error_message": { + "type": "string", + "description": "错误信息(仅异常时出现)" + } + } } } }, @@ -36479,119 +39336,79 @@ "security": [] } }, - "/oauth/token": { + "/api/v5/video/status": { "post": { - "summary": "获取或刷新授权 Token 接口", + "summary": "图像生成视频(查询状态)", "deprecated": false, - "description": "## 基本信息\n- 请求路径: `/oauth/token`\n- 请求方法: POST\n- 接口说明: 用于获取或刷新访问令牌(access_token)的统一接口\n\n## 请求参数\n\n### Query 参数\n\n| 参数名 | 必填 | 类型 | 说明 |\n|--------|------|------|------|\n| grant_type | 是 | string | 授权类型。可选值:
- `authorization_code`: 授权码模式,用于获取新token
- `refresh_token`: 刷新token模式,用于刷新已有token |\n| code | 条件必填 | string | 授权码。当 grant_type=authorization_code 时必填 |\n| client_id | 条件必填 | string | 注册的客户端ID。当 grant_type=authorization_code 时必填 |\n| refresh_token | 条件必填 | string | 刷新令牌。当 grant_type=refresh_token 时必填 |\n\n### Body 参数\n\n| 参数名 | 必填 | 类型 | 说明 |\n|--------|------|------|------|\n| client_secret | 条件必填 | string | 注册的客户端密钥。当 grant_type=authorization_code 时必填 |\n\n## 使用场景\n\n1. **获取新的访问令牌**\n - 设置 grant_type=authorization_code\n - 提供 code、client_id 和 client_secret\n \n2. **刷新访问令牌**\n - 设置 grant_type=refresh_token\n - 提供 refresh_token\n\n## 示例\n\n### 获取新token\n```\nPOST /oauth/token?grant_type=authorization_code&code={code}&client_id={client_id}\nContent-Type: application/json\n\n{\n \"client_secret\": \"{client_secret}\"\n}\n```\n\n### 刷新token\n```\nPOST /oauth/token?grant_type=refresh_token&refresh_token={refresh_token}\n```", - "operationId": "post_oauth_token?grant_type=authorization_code&code={code}&client_id={client_id}&client_secret={client_secret}", + "description": "根据 requestId查询视频生成状态。", + "operationId": "post-api-v-5-video-status", "tags": [ - "OAuth2" + "AI hub" ], "parameters": [ { - "name": "grant_type", - "in": "query", - "description": "授权码模式", + "name": "Authorization", + "in": "header", + "description": "用户个人令牌", "required": true, "example": "", "schema": { "type": "string" } - }, - { - "name": "code", - "in": "query", - "description": "授权码", - "required": false, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "client_id", - "in": "query", - "description": "注册的客户端 ID", - "required": false, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "client_secret", - "in": "query", - "description": "注册的客户端密钥", - "required": false, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "refresh_token", - "in": "query", - "description": "刷新令牌,仅在 grant_type 为 refresh_token 时必传", - "required": false, - "example": "", - "schema": { - "type": "string" - } } ], "requestBody": { "content": { "application/json": { "schema": { + "required": [ + "request_id" + ], "type": "object", "properties": { - "client_secret": { + "request_id": { "type": "string", - "description": "注册的客户端密钥" + "description": "请求ID", + "example": "009522a671394f3f5ac02c63b1a62662" } }, - "required": [ - "client_secret" - ] + "description": "" }, - "example": { - "client_secret": "string" - } + "example": "" } } }, "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "access_token": { - "type": "string" - }, - "expires_in": { - "type": "integer" + "request_id": { + "type": "string", + "description": "请求ID(有效时长为 24h,请尽快获取结果)" }, - "refresh_token": { - "type": "string" + "status": { + "type": "string", + "description": "处理状态(running,failed,succeeded)", + "example": "succeeded" }, - "scope": { - "type": "string" + "video_url": { + "type": "string", + "description": "视频URL(仅成功返回,且有效时长为 10 分钟)" }, - "created_at": { - "type": "string" + "error_message": { + "type": "string", + "description": "错误信息(仅异常时出现)" } } }, "example": { - "access_token": "eyPZPVNfsibj9tap_ibj3t3p", - "expires_in": 1296000, - "refresh_token": "b77ced3aee884348852160deab3697a1", - "scope": "all_user all_key all_groups all_projects all_pr all_issue all_note all_hook all_repository", - "created_at": "2024-04-20T09:07:59.889Z" + "request_id": "2600c2714f184f9087060b014fb2f7a3", + "status": "succeeded", + "video_url": "https://ai-inference-cdn-static.gitcode.com/video-2600c2714f184f9087060b014fb2f7a3-output.mp4?auth_key=1765510460-86c58596bd5944b1af78aa3587cfb902-0-44a97eda8e44774e561eaced4dd124865c7855ca2e251f3099b3ec3aea77c62b" } } }, @@ -36601,158 +39418,226 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/releases/tags/{tag}": { - "get": { - "summary": "根据Tag名称获取仓库的Release", + "/api/v5/audio/classification": { + "post": { + "summary": "音频分类", "deprecated": false, - "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_releases_tags_{tag}", + "description": "对音频文件进行情感分类识别", + "operationId": "post-api-v-5-audio-classification", "tags": [ - "Release" + "AI hub" ], "parameters": [ { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", + "name": "model", + "in": "query", + "description": "模型名称,默认为 audeering/wav2vec2-large-robust-12-ft-emotion-msp-dim", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "tag", - "in": "path", - "description": "Tag 名称", + "name": "Authorization", + "in": "header", + "description": "用户个人令牌", "required": true, "example": "", "schema": { "type": "string" } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": true, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "音频文件 (支持 mp3, wav)", + "example": "" + } + }, + "required": [ + "file" + ] + }, + "example": { + "file": "" + } + } + } + }, "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "tag_name": { - "type": "string" - }, - "target_commitish": { - "type": "string" - }, - "prerelease": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "body": { - "type": "string" + "vector": { + "type": "number", + "description": "音频文件的向量表示" }, - "author": { + "emotion_class": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" + "arousal": { + "type": "number", + "description": "唤醒度分数(情感激活程度:如兴奋/平静)" }, - "type": { - "type": "string" + "dominance": { + "type": "number", + "description": "支配度分数(情感控制感:如支配/顺从)" }, - "url": { - "type": "string" + "valence": { + "type": "number", + "description": "效价分数(情感正负向:如愉悦/不悦)\t" } } }, - "created_at": { - "type": "string" - }, - "assets": { + "emotionItems": { "type": "array", "items": { + "description": "情感分类项(格式化后)", "type": "object", "properties": { - "browser_download_url": { - "type": "string" + "label": { + "type": "string", + "description": "分类名称", + "example": "激动程度" }, - "name": { - "type": "string" + "labelEn": { + "type": "string", + "description": "分类名称(英文)", + "example": "Arousal" + }, + "value": { + "type": "string", + "description": "数值", + "example": "0.6820112466812134" + }, + "valueDesc": { + "type": "string", + "description": "数值描述", + "example": "偏激动" + }, + "valueDescEn": { + "type": "string", + "description": "数值描述(英文)", + "example": "slightly excited" } } - } + }, + "description": "情感分类结果列表(格式化后)" } } }, - "example": { - "tag_name": "v1.0.217", - "target_commitish": "930401b0dd58a809fce34da091b8aa3d6083cb33", - "prerelease": false, - "name": "learn serde", - "body": "learn serde 描述", - "author": { - "id": "26593", - "login": "fenglonghui", - "name": "龙辉", - "avatar_url": "https://cdn-img.gitcode.com/de/af/61d5ea0ffc926181d235ba5a66f58dc51734500a1eda9b0d429d71300c20a149.png?time=1732777805505", - "html_url": "https://gitcode.com/fenglonghui", - "type": "User", - "url": "https://api.gitcode.com/api/v5/users/fenglonghui" + "examples": { + "1": { + "summary": "成功示例", + "value": { + "vector": null, + "emotion_class": { + "arousal": 0.38037118315696716, + "dominance": 0.4589272439479828, + "valence": 0.5078083276748657 + }, + "emotion_items": [ + { + "label": "激动程度", + "label_en": "Arousal", + "value": "0.38037118315696716", + "value_desc": "偏平静", + "value_desc_en": "Calm" + }, + { + "label": "情绪正负", + "label_en": "Valence", + "value": "0.5078083276748657", + "value_desc": "中性", + "value_desc_en": "Neutral" + }, + { + "label": "控制感", + "label_en": "Dominance", + "value": "0.4589272439479828", + "value_desc": "中性", + "value_desc_en": "Medium Control" + } + ] + } }, - "created_at": "2025-01-16T19:58:07+08:00", - "assets": [ - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.zip", - "name": "serde-v1.0.217.zip" - }, - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.gz", - "name": "serde-v1.0.217.tar.gz" - }, - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.bz2", - "name": "serde-v1.0.217.tar.bz2" - }, - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar", - "name": "serde-v1.0.217.tar" + "2": { + "summary": "成功示例", + "value": { + "emotionItems": [ + { + "label": "", + "labelEn": "", + "value": "", + "valueDesc": "", + "valueDescEn": "" + } + ] } - ] + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/image/generate": { + "post": { + "summary": "生成图像", + "deprecated": false, + "description": "生成图像\n根据提示词生成图像,支持文本和图片审核", + "tags": [ + "AI hub" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImageGenerationReq", + "description": "" + }, + "example": { + "model": "hf_mirrors/Kwai-Kolors/Kolors", + "prompt": "生成一只小猫", + "seed": 1234516789, + "num_inference_steps": 20, + "guidance_scale": 4, + "cfg": 1 + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseEntityImageGenerationResp" + }, + "example": { + "images": [ + "" + ], + "request_id": "", + "status": "", + "error_message": "", + "processing_time": 0 } } }, @@ -36762,86 +39647,21 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/releases/{tag}": { - "patch": { - "summary": "更新仓库Release", + "/api/v5/audio/speech": { + "post": { + "summary": "文本转语音", "deprecated": false, - "description": "", - "operationId": "patch-api-v-5-repos-owner-repo-releases-tag", + "description": "文本转语音", "tags": [ - "Release" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "tag", - "in": "path", - "description": "Tag 名称", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": false, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "Content-Type", - "in": "header", - "description": "", - "required": false, - "example": "application/json", - "schema": { - "type": "string" - } - } + "AI hub" ], + "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Release 名称" - }, - "body": { - "type": "string", - "description": "Release 描述\t" - } - }, - "required": [ - "name", - "body" - ] + "$ref": "#/components/schemas/TextToSpeechReq", + "description": "" }, "example": "" } @@ -36856,61 +39676,29 @@ "type": "object", "properties": {} }, - "example": { - "tag_name": "v1.0.217", - "target_commitish": "930401b0dd58a809fce34da091b8aa3d6083cb33", - "prerelease": false, - "name": "release1 名称", - "body": "release1 描述", - "author": { - "id": "26593", - "login": "fenglonghui", - "name": "龙辉", - "avatar_url": "https://cdn-img.gitcode.com/de/af/61d5ea0ffc926181d235ba5a66f58dc51734500a1eda9b0d429d71300c20a149.png?time=1732777805505", - "html_url": "https://gitcode.com/fenglonghui", - "type": "User", - "url": "https://api.gitcode.com/api/v5/users/fenglonghui" - }, - "created_at": "2025-01-16T19:58:07+08:00", - "assets": [ - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.zip", - "name": "serde-v1.0.217.zip" - }, - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.gz", - "name": "serde-v1.0.217.tar.gz" - }, - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.bz2", - "name": "serde-v1.0.217.tar.bz2" - }, - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar", - "name": "serde-v1.0.217.tar" - } - ] - } + "example": {} } }, "headers": {} } }, "security": [] - }, + } + }, + "/api/v5/org/{owner}/kanban/list": { "get": { - "summary": "获取仓库的单个Releases", + "summary": "获取组织看板列表", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_releases_{tag}", + "operationId": "get_api_v5_org_{owner}_kanban_list", "tags": [ - "Release" + "KanBan" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "组织的路径", "required": true, "example": "", "schema": { @@ -36918,38 +39706,63 @@ } }, { - "name": "repo", - "in": "path", - "description": "仓库路径(path)", - "required": true, - "example": "", + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, "schema": { "type": "string" } }, { - "name": "tag", - "in": "path", - "description": "Tag 名称", - "required": true, - "example": "", + "name": "status", + "in": "query", + "description": "状态 0: 正常 1:关闭,默认不传为全部", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "sort", + "in": "query", + "description": "最新: newest, 最老: oldest ", + "required": false, "schema": { "type": "string" } }, { - "name": "access_token", + "name": "visibility", "in": "query", - "description": "用户授权码", - "required": true, + "description": "可见性 1:公开的 2: 私密的", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "search", + "in": "query", + "description": "按照名称搜索", + "required": false, "schema": { "type": "string" } }, { - "name": "temp_download_url", + "name": "page", "in": "query", - "description": "是否返回源码包和附件临时下载地址,默认false", + "description": "当前页码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页数量", "required": false, "schema": { "type": "string" @@ -36964,91 +39777,59 @@ "schema": { "type": "object", "properties": { - "tag_name": { - "type": "string" - }, - "target_commitish": { - "type": "string" - }, - "prerelease": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "body": { - "type": "string" + "close_count": { + "type": "integer" }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "required": [ - "id", - "login", - "name", - "avatar_url", - "html_url", - "type", - "url" - ] + "open_count": { + "type": "integer" }, - "created_at": { - "type": "string" + "all_count": { + "type": "integer" }, - "assets": { + "content": { "type": "array", "items": { "type": "object", "properties": { - "browser_download_url": { + "id": { "type": "string" }, + "iid": { + "type": "integer" + }, "name": { "type": "string" }, - "type": { + "description": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "visibility": { + "type": "integer" + }, + "updated_at": { "type": "string" } }, "required": [ - "browser_download_url", + "id", + "iid", "name", - "type" + "description", + "status", + "visibility", + "updated_at" ] } } }, "required": [ - "tag_name", - "target_commitish", - "prerelease", - "name", - "body", - "author", - "created_at", - "assets" + "close_count", + "open_count", + "all_count", + "content" ] } } @@ -37059,20 +39840,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/releases": { - "get": { - "summary": "获取仓库的所有Releases", + "/org/{owner}/kanban/repo/{repo}/{type}/{iid}": { + "put": { + "summary": "更新Issue或者Pull Request关联的看板", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_releases", + "operationId": "put_api_v5_org_{owner}_kanban_repo_{repo}_{type}_{iid}", "tags": [ - "Release" + "KanBan" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "组织的路径", "required": true, "example": "", "schema": { @@ -37082,7 +39863,7 @@ { "name": "repo", "in": "path", - "description": "仓库路径(path)", + "description": "仓库的路径", "required": true, "example": "", "schema": { @@ -37090,147 +39871,168 @@ } }, { - "name": "access_token", - "in": "query", - "description": "用户授权码", + "name": "type", + "in": "path", + "description": "类型,issue/merge_request", "required": true, + "example": "", "schema": { "type": "string" } }, { - "name": "direction", - "in": "query", - "description": "可选。升序/降序。不填为升序", - "required": false, + "name": "iid", + "in": "path", + "description": "issue或者pull request的iid", + "required": true, + "example": "", "schema": { "type": "string" } }, { - "name": "page", + "name": "access_token", "in": "query", - "description": "当前的页码", + "description": "用户授权码", "required": false, "schema": { - "type": "integer" + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "kanban_id": { + "type": "string", + "description": "看板id" + } + }, + "required": [ + "kanban_id" + ] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/org/{owner}/kanban/{kanban_id}/remove_item": { + "delete": { + "summary": "删除看板关联的Issue或者Pull Request", + "deprecated": false, + "description": "", + "operationId": "delete_api_v5_org_{owner}_kanban_{kanban_id}_remove_item", + "tags": [ + "KanBan" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "组织的路径", + "required": true, + "example": "", + "schema": { + "type": "string" } }, { - "name": "per_page", + "name": "kanban_id", + "in": "path", + "description": "看板id", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", "in": "query", - "description": "每页的数量,最大为100,默认 20", + "description": "用户授权码", "required": false, "schema": { - "type": "integer" + "type": "string" } } ], - "responses": { - "200": { - "description": "成功响应", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "issue_pr_iids": { "type": "object", "properties": { - "tag_name": { - "type": "string" - }, - "target_commitish": { - "type": "string" - }, - "prerelease": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "body": { - "type": "string" + "owner": { + "type": "string", + "description": "组织的路径" }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" - } - } + "repo": { + "type": "string", + "description": "仓库的路径" }, - "created_at": { - "type": "string" + "issue_iids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "仓库内issue的iid" }, - "assets": { + "pr_iids": { "type": "array", "items": { - "type": "object", - "properties": { - "browser_download_url": { - "type": "string" - }, - "name": { - "type": "string" - } - } - } + "type": "integer" + }, + "description": "仓库内pull request的iid" } - } - } - }, - "example": { - "tag_name": "v1.0.217", - "target_commitish": "930401b0dd58a809fce34da091b8aa3d6083cb33", - "prerelease": false, - "name": "release1 名称", - "body": "release1 描述", - "author": { - "id": "26593", - "login": "fenglonghui", - "name": "龙辉", - "avatar_url": "https://cdn-img.gitcode.com/de/af/61d5ea0ffc926181d235ba5a66f58dc51734500a1eda9b0d429d71300c20a149.png?time=1732777805505", - "html_url": "https://gitcode.com/fenglonghui", - "type": "User", - "url": "https://api.gitcode.com/api/v5/users/fenglonghui" - }, - "created_at": "2025-01-16T19:58:07+08:00", - "assets": [ - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.zip", - "name": "serde-v1.0.217.zip" - }, - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.gz", - "name": "serde-v1.0.217.tar.gz" - }, - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar.bz2", - "name": "serde-v1.0.217.tar.bz2" }, - { - "browser_download_url": "https://gitcode.com/rust-learning/serde/-/archive/v1.0.217/serde-v1.0.217.tar", - "name": "serde-v1.0.217.tar" - } - ] + "required": [ + "owner", + "repo", + "issue_iids", + "pr_iids" + ], + "description": "要删的issue或者pull request信息" + } + }, + "required": [ + "issue_pr_iids" + ] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} } } }, @@ -37238,20 +40040,22 @@ } }, "security": [] - }, - "post": { - "summary": "创建仓库Release", + } + }, + "/api/v5/org/{owner}/kanban/{kanban_id}/detail": { + "get": { + "summary": "获取单个看板详情", "deprecated": false, "description": "", - "operationId": "post_api_v5_repos_{owner}_{repo}_releases", + "operationId": "get_api_v5_org_{owner}_kanban_{id}_detail", "tags": [ - "Release" + "KanBan" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "组织的路径", "required": true, "example": "", "schema": { @@ -37259,9 +40063,9 @@ } }, { - "name": "repo", + "name": "kanban_id", "in": "path", - "description": "仓库路径", + "description": "看板id", "required": true, "example": "", "schema": { @@ -37272,45 +40076,12 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "tag_name": { - "type": "string", - "description": "tag名称" - }, - "name": { - "type": "string", - "description": "release名称" - }, - "body": { - "type": "string", - "description": "release描述" - }, - "target_commitish": { - "type": "string", - "description": "分支名称或者commit SHA,如果tag不存在,需要新建tag则传入该参数,如果不传入该参数,则为默认分支的最新提交" - } - }, - "required": [ - "tag_name", - "name", - "body" - ] - }, - "example": "" - } - } - }, "responses": { "200": { "description": "", @@ -37319,91 +40090,28 @@ "schema": { "type": "object", "properties": { - "tag_name": { - "type": "string" - }, - "target_commitish": { + "id": { "type": "string" }, - "prerelease": { - "type": "boolean" - }, "name": { "type": "string" }, - "body": { + "description": { "type": "string" }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "required": [ - "id", - "login", - "name", - "avatar_url", - "html_url", - "type", - "url" - ] - }, - "created_at": { - "type": "string" + "status": { + "type": "integer" }, - "assets": { - "type": "array", - "items": { - "type": "object", - "properties": { - "browser_download_url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "browser_download_url", - "name", - "type" - ] - } + "visibility": { + "type": "integer" } }, "required": [ - "tag_name", - "target_commitish", - "prerelease", + "id", "name", - "body", - "author", - "created_at", - "assets" + "description", + "status", + "visibility" ] } } @@ -37414,20 +40122,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/releases/latest": { - "get": { - "summary": "获取仓库的最后更新的Release", + "/api/v5/org/{owner}/kanban/{kanban_id}/add_item": { + "post": { + "summary": "添加Issue或者Pull Request到看板", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_releases_latest", + "operationId": "post_api_v5_org_{owner}_kanban_{id}_add_item", "tags": [ - "Release" + "KanBan" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "组织的路径", "required": true, "example": "", "schema": { @@ -37435,9 +40143,9 @@ } }, { - "name": "repo", + "name": "kanban_id", "in": "path", - "description": "仓库路径(path)", + "description": "看板id", "required": true, "example": "", "schema": { @@ -37448,12 +40156,47 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "repo": { + "type": "string", + "description": "仓库的路径" + }, + "issue_iids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "仓库内issue的iid" + }, + "pr_iids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "仓库内pull request的iid" + } + }, + "required": [ + "repo", + "issue_iids", + "pr_iids" + ] + }, + "example": "" + } + } + }, "responses": { "200": { "description": "", @@ -37461,124 +40204,7 @@ "application/json": { "schema": { "type": "object", - "properties": { - "tag_name": { - "type": "string" - }, - "target_commitish": { - "type": "string" - }, - "prerelease": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "body": { - "type": "string" - }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "required": [ - "id", - "login", - "name", - "avatar_url", - "html_url", - "type", - "url" - ] - }, - "created_at": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "type": "object", - "properties": { - "browser_download_url": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "browser_download_url", - "name" - ] - } - } - }, - "required": [ - "tag_name", - "target_commitish", - "prerelease", - "name", - "body", - "author", - "created_at", - "assets" - ] - }, - "example": { - "tag_name": "V0.0.1", - "target_commitish": "b33d10690347a36ccbf7464fe16466c1409f9533", - "prerelease": false, - "name": "V0.0.1", - "body": "V0.0.1", - "author": { - "id": "645", - "login": "yanfan", - "name": "殿前都点检", - "avatar_url": "https://gitcode-img.obs.cn-south-1.myhuaweicloud.com:443/df/ae/64d7f5ae52df30ea2b696064187dbf4871e29217a1a9de303bbc46f43dbb0dd6.png?time=1737363381562", - "html_url": "https://test.gitcode.net/yanfan", - "type": "User", - "url": "https://api-test.gitcode.net/api/v5/users/yanfan" - }, - "created_at": "2024-04-15T20:43:35+08:00", - "assets": [ - { - "browser_download_url": "https://test.gitcode.net/test_associate/YanF1/-/archive/V0.0.1/YanF1-V0.0.1.zip", - "name": "YanF1-V0.0.1.zip" - }, - { - "browser_download_url": "https://test.gitcode.net/test_associate/YanF1/-/archive/V0.0.1/YanF1-V0.0.1.tar.gz", - "name": "YanF1-V0.0.1.tar.gz" - }, - { - "browser_download_url": "https://test.gitcode.net/test_associate/YanF1/-/archive/V0.0.1/YanF1-V0.0.1.tar.bz2", - "name": "YanF1-V0.0.1.tar.bz2" - }, - { - "browser_download_url": "https://test.gitcode.net/test_associate/YanF1/-/archive/V0.0.1/YanF1-V0.0.1.tar", - "name": "YanF1-V0.0.1.tar" - } - ] + "properties": {} } } }, @@ -37588,20 +40214,20 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/releases/{tag}/attach_files/{file_name}/download": { - "get": { - "summary": "下载仓库release附件", + "/api/v5/org/{owner}/kanban/repo/{repo}/{type}/{iid}": { + "put": { + "summary": "更新Issue或者Pull Request关联的看板", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_releases_attach_files_{file_name}_download", + "operationId": "put_api_v5_org_{owner}_kanban_repo_{repo}_{type}_{iid}_new", "tags": [ - "Release" + "KanBan" ], "parameters": [ { "name": "owner", "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", + "description": "组织的路径", "required": true, "example": "", "schema": { @@ -37611,7 +40237,7 @@ { "name": "repo", "in": "path", - "description": "仓库路径(path)", + "description": "仓库的路径", "required": true, "example": "", "schema": { @@ -37619,9 +40245,9 @@ } }, { - "name": "tag", + "name": "type", "in": "path", - "description": "标签名称", + "description": "类型,issue/merge_request", "required": true, "example": "", "schema": { @@ -37629,9 +40255,9 @@ } }, { - "name": "file_name", + "name": "iid", "in": "path", - "description": "附件名称", + "description": "issue或者pull request的iid", "required": true, "example": "", "schema": { @@ -37642,18 +40268,131 @@ "name": "access_token", "in": "query", "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "kanban_id": { + "type": "string", + "description": "看板id" + } + }, + "required": [ + "kanban_id" + ] + }, + "example": "" + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v5/org/{owner}/kanban/{kanban_id}/remove_item": { + "delete": { + "summary": "删除看板关联的Issue或者Pull Request", + "deprecated": false, + "description": "", + "operationId": "delete_api_v5_org_{owner}_kanban_{kanban_id}_remove_item_new", + "tags": [ + "KanBan" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "组织的路径", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "kanban_id", + "in": "path", + "description": "看板id", "required": true, "example": "", "schema": { "type": "string" } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "repo": { + "type": "string", + "description": "仓库的路径" + }, + "issue_iids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "仓库内issue的iid" + }, + "pr_iids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "仓库内pull request的iid" + } + }, + "required": [ + "repo", + "issue_iids", + "pr_iids" + ] + } + }, + "example": "" + } + } + }, "responses": { "200": { "description": "", "content": { - "*/*": { + "application/json": { "schema": { "type": "object", "properties": {} @@ -37666,60 +40405,105 @@ "security": [] } }, - "/api/v5/repos/{owner}/{repo}/releases/{tag}/upload_url": { + "/api/v5/org/{owner}/kanban/{kanban_id}/item_list": { "get": { - "summary": "获取Release附件上传地址", + "summary": "获取看板内容列表", "deprecated": false, "description": "", - "operationId": "get_api_v5_repos_{owner}_{repo}_releases_{tag}_upload_url", + "operationId": "get_api_v5_org_{owner}_kanban_{kanban_id}_item_list", "tags": [ - "Release" + "KanBan" ], "parameters": [ { - "name": "owner", - "in": "path", - "description": "仓库所属空间地址(企业、组织或个人的地址path)", - "required": true, - "example": "", + "name": "owner", + "in": "path", + "description": "组织的路径", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "kanban_id", + "in": "path", + "description": "看板id", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "query", + "description": "仓库路径", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "source_type", + "in": "query", + "description": "来源类型:issue/merge_request", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "source_status", + "in": "query", + "description": "来源状态:opened/closed/merged", + "required": false, "schema": { "type": "string" } }, { - "name": "repo", - "in": "path", - "description": "仓库路径", - "required": true, - "example": "", + "name": "title", + "in": "query", + "description": "标题", + "required": false, "schema": { "type": "string" } }, { - "name": "tag", - "in": "path", - "description": "tag名称", - "required": true, - "example": "", + "name": "source_iids", + "in": "query", + "description": "使用pr或者issue的iid进行查询, 使用该参数必须填写repo参数,否则不生效", + "required": false, "schema": { "type": "string" } }, { - "name": "access_token", + "name": "page", "in": "query", - "description": "用户授权码", - "required": true, + "description": "分页参数,第几页", + "required": false, "schema": { "type": "string" } }, { - "name": "file_name", + "name": "per_page", "in": "query", - "description": "要上传的文件名称", - "required": true, + "description": "分页参数,每页数量", + "required": false, "schema": { "type": "string" } @@ -37731,296 +40515,268 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "上传的地址,使用put请求" - }, - "headers": { - "type": "object", - "properties": { - "x-obs-meta-project-id": { - "type": "string" - }, - "x-obs-acl": { - "type": "string" - }, - "x-obs-callback": { - "type": "string" - }, - "Content-Type": { - "type": "string" - } + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" }, - "required": [ - "x-obs-meta-project-id", - "x-obs-acl", - "x-obs-callback", - "Content-Type" - ], - "description": "上传的请求需要携带的请求头" - } - }, - "required": [ - "url", - "headers" - ] - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/api/v5/chat/completions": { - "post": { - "summary": "send", - "deprecated": false, - "description": "", - "tags": [ - "AI-Hub" - ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatSendStreamReq", - "description": "" - }, - "example": { - "temperature": 0.7, - "top_k": 50, - "top_p": 0.7, - "frequency_penalty": 1, - "messages": [ - { - "role": "user", - "content": "你好,你能帮我什么忙?" - } - ], - "model": "hf_mirrors/rohithsiddhartha/DeepSeek-R1-4bit", - "max_tokens": 4096 - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "timeout": { - "type": [ - "integer", - "null" - ], - "description": "", - "format": "int64" - }, - "handler": { - "oneOf": [ - { - "description": "", - "$ref": "#/components/schemas/Handler" - }, - { - "type": "null" - } - ] - }, - "earlySendAttempts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DataWithMediaType", - "description": "org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter.DataWithMediaType" + "number": { + "type": "integer" }, - "description": "" - }, - "complete": { - "type": "boolean", - "description": "" - }, - "failure": { - "oneOf": [ - { - "description": "", - "$ref": "#/components/schemas/Throwable" + "title": { + "type": "string" + }, + "source_type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "full_name": { + "type": "string" + }, + "human_name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } }, - { - "type": "null" + "required": [ + "id", + "full_name", + "human_name", + "url", + "name" + ] + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "color" + ] } - ] - }, - "sendFailed": { - "type": "boolean", - "description": "" - }, - "timeoutCallback": { - "$ref": "#/components/schemas/DefaultCallback", - "description": "" - }, - "errorCallback": { - "$ref": "#/components/schemas/ErrorCallback", - "description": "" - }, - "completionCallback": { - "$ref": "#/components/schemas/DefaultCallback", - "description": "" - } - } - }, - "example": { - "timeout": 0, - "handler": {}, - "earlySendAttempts": [ - { - "data": {}, - "mediaType": { - "type": "", - "subtype": "", - "parameters": { - "": "" - }, - "toStringValue": "", - "wildcardType": false, - "wildcardSubtype": false, - "concrete": false, - "subtypeSuffix": "", - "charset": { - "name": "", - "aliases": [ - "" - ], - "aliasSet": [ - "" - ], - "registered": false - }, - "qualityValue": 0 - } - } - ], - "complete": false, - "failure": { - "detailMessage": "", - "cause": { - "detailMessage": "", - "cause": {}, - "stackTrace": [ - { - "declaringClass": "", - "methodName": "", - "fileName": "", - "lineNumber": 0, - "className": "", - "nativeMethod": false + }, + "assignees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url", + "url" + ] } - ], - "suppressedExceptions": [ - {} - ], - "message": "", - "localizedMessage": "", - "suppressed": [ - {} - ] - }, - "stackTrace": [ - { - "declaringClass": "", - "methodName": "", - "fileName": "", - "lineNumber": 0, - "className": "", - "nativeMethod": false - } - ], - "suppressedExceptions": [ - { - "detailMessage": "", - "cause": {}, - "stackTrace": [ - { - "declaringClass": "", - "methodName": "", - "fileName": "", - "lineNumber": 0, - "className": "", - "nativeMethod": false + }, + "milestone_resp": { + "type": "object", + "properties": { + "html_url": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string" } - ], - "suppressedExceptions": [ - {} - ], - "message": "", - "localizedMessage": "", - "suppressed": [ - {} + }, + "required": [ + "html_url", + "id", + "title", + "url" ] - } - ], - "message": "", - "localizedMessage": "", - "suppressed": [ - { - "detailMessage": "", - "cause": {}, - "stackTrace": [ - { - "declaringClass": "", - "methodName": "", - "fileName": "", - "lineNumber": 0, - "className": "", - "nativeMethod": false + }, + "linked_pull_requests": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "html_url": { + "type": "string" + }, + "number": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "url": { + "type": "string" + }, + "repo": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "full_name": { + "type": "string" + }, + "human_name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "full_name", + "human_name", + "url", + "name" + ] + } } - ], - "suppressedExceptions": [ - { - "detailMessage": "", - "cause": {}, - "stackTrace": [ - { - "declaringClass": "", - "methodName": "", - "fileName": "", - "lineNumber": 0, - "className": "", - "nativeMethod": false - } - ], - "suppressedExceptions": [ - {} - ], - "message": "", - "localizedMessage": "", - "suppressed": [ - {} - ] + } + }, + "values": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "type": "string" + }, + "value": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "value": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "description": { + "type": "string" + } + }, + "required": [ + "color", + "value", + "position" + ] + } + }, + "required": [ + "field_name", + "field_type", + "value" + ] + } + }, + "reviewers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "url": { + "type": "string" + } } - ], - "message": "", - "localizedMessage": "", - "suppressed": [ - {} - ] + } } + }, + "required": [ + "id", + "number", + "title", + "source_type", + "status", + "html_url", + "url", + "repo", + "labels", + "values", + "assignees" ] - }, - "sendFailed": false, - "timeoutCallback": { - "delegate": {} - }, - "errorCallback": {}, - "completionCallback": { - "delegate": {} } } } @@ -38031,25 +40787,45 @@ "security": [] } }, - "/api/v5/similarity/": { - "post": { - "summary": "句子相似度", + "/api/v5/org/{owner}/kanban/{kanban_id}/state": { + "put": { + "summary": "修改看板状态", "deprecated": false, "description": "", - "operationId": "post-api-v-5-similarity", + "operationId": "put_api_v5_org_{owner}_kanban_{kanban_id}_state", "tags": [ - "AI-Hub" + "KanBan" ], "parameters": [ { - "name": "Authorization", - "in": "header", - "description": "用户个人令牌", + "name": "owner", + "in": "path", + "description": "组织的路径", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "kanban_id", + "in": "path", + "description": "看板id", "required": true, "example": "", "schema": { "type": "string" } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "example": "", + "schema": { + "type": "string" + } } ], "requestBody": { @@ -38058,49 +40834,16 @@ "schema": { "type": "object", "properties": { - "model": { + "state": { "type": "string", - "title": "模型名称" - }, - "inputs": { - "type": "object", - "properties": { - "source_sentence": { - "type": "string", - "title": "对比的源文本", - "description": "示例:\"That is a happy person\"" - }, - "sentences": { - "type": "array", - "items": { - "type": "string" - }, - "title": "对比的目标文本数组", - "description": "示例:[\"That is a happy dog\", \"That is a very happy person\"]" - } - }, - "required": [ - "source_sentence", - "sentences" - ], - "title": "输入参数" + "description": "看板状态,关闭:closed;开启:open" } }, "required": [ - "model", - "inputs" + "state" ] }, - "example": { - "model": "text2vec-base-chinese", - "inputs": { - "source_sentence": "That is a happy person", - "sentences": [ - "That is a happy dog", - "That is a very happy person" - ] - } - } + "example": "" } } }, @@ -38110,20 +40853,8 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "number" - } - }, - "examples": { - "1": { - "summary": "成功示例", - "value": 0.8220268487930298 - }, - "2": { - "summary": "成功示例", - "value": 0.9805881381034851 - } + "type": "object", + "properties": {} } } }, @@ -38133,85 +40864,315 @@ "security": [] } }, - "/api/v1/images/edits": { - "post": { - "summary": "图像生成图像", + "/api/v8/enterprises/{enterprise}/members/{username}": { + "get": { + "summary": "获取企业的一个成员", "deprecated": false, - "description": "根据输入图片和提示词生成新图片,使用multipart/form-data格式上传图片。", - "operationId": "post-api-v-1-images-edits", + "description": "", + "operationId": "get_api_v8_enterprises_{enterprise}_members_{username}", "tags": [ - "AI-Hub" + "Enterprise", + "Organizations" ], "parameters": [ { - "name": "model", + "name": "enterprise", + "in": "path", + "description": "企业id", + "required": true, + "example": "", + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "in": "path", + "description": "用户名(username/login)", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", "in": "query", - "description": "模型名称", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "required": [ + "avatar_url", + "html_url", + "id", + "object_id", + "login", + "name", + "url", + "user_id" + ] + }, + "active": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "role_name": { + "type": "string" + }, + "role_id": { + "type": "string" + }, + "role_name_cn": { + "type": "string" + }, + "enterprise_email": { + "type": "string" + } + }, + "required": [ + "user", + "active", + "role", + "role_name", + "role_id", + "role_name_cn", + "enterprise_email" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + }, + "delete": { + "summary": "删除企业成员", + "deprecated": false, + "description": "", + "operationId": "delete_api_v8_enterprises_{enterprise}_members_{usernames}", + "tags": [ + "Enterprise", + "Organizations" + ], + "parameters": [ + { + "name": "enterprise", + "in": "path", + "description": "企业id", + "required": true, + "example": "", + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "in": "path", + "description": "", "required": true, + "example": "", "schema": { "type": "string" } }, { - "name": "prompt", + "name": "access_token", "in": "query", - "description": "提示词", + "description": "用户授权码", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + }, + "example": { + "user": { + "avatar_url": "https://cdn-img.gitcode.com/ec/fb/430ecf07b9ee91bbbbf341d92a36783d06e69086f82ce8cf5a6406f79f1c9cf4.png", + "html_url": "https://gitcode.com/dengmengmian", + "id": "268", + "login": "dengmengmian", + "name": "麻凡", + "url": "https://api.gitcode.com/api/v5/dengmengmian" + }, + "url": "https://api.gitcode.com/api/v5/enterprises/go-tribe/members/dengmengmian", + "active": true, + "role": "admin" + } + } + }, + "headers": {} + } + }, + "security": [] + }, + "put": { + "summary": "修改企业成员权限", + "deprecated": false, + "description": "", + "operationId": "put_api_v8_enterprises_{enterprise}_members_{username}", + "tags": [ + "Enterprise", + "Organizations" + ], + "parameters": [ + { + "name": "enterprise", + "in": "path", + "description": "企业id", + "required": true, + "example": "", + "schema": { + "type": "integer" + } }, { - "name": "Authorization", - "in": "header", - "description": "用户个人令牌", + "name": "username", + "in": "path", + "description": "用户名(username/login)", "required": true, "example": "", "schema": { "type": "string" } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { "type": "object", "properties": { - "image": { + "role": { "type": "string", - "format": "binary", - "examples": [ - "" - ], - "example": "" + "description": "企业角色(viewer:浏览者、tester:测试人、developer:研发、maintainer:维护者、admin:管理员、customized:自定义角色)" + }, + "role_id": { + "type": "string", + "description": "角色ID, 如果role传入了customized则需要传入角色id" } }, "required": [ - "image" + "role" ] - } + }, + "example": "" } } }, "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseEntityImageToImageResp" + "type": "object", + "properties": { + "active": { + "type": "integer" + }, + "role": { + "type": "string" + }, + "url": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "login": { + "type": "string" + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "name": { + "type": "string", + "description": "名称" + } + }, + "required": [ + "name" + ] + } + } }, "example": { - "request_id": "", - "created": 0, - "data": [ - { - "b64_json": "", - "url": "" - } - ], - "error": "" + "active": true, + "role": "member", + "url": "https://api.gitcode.com/api/v5/enterprises/litestabc/members/malongge5", + "user": { + "id": 953, + "login": "malongge5", + "url": "https://api.gitcode.com/api/v5/malongge5", + "html_url": "https://gitcode.com/malongge5" + } } } }, @@ -38221,77 +41182,141 @@ "security": [] } }, - "/api/v5/audio/transcriptions": { - "post": { - "summary": "自动语音识别", + "/api/v8/enterprises/{enterprise}/members": { + "get": { + "summary": "列出企业的所有成员", "deprecated": false, "description": "", - "operationId": "post-api-v-1-audio-transcriptions", + "operationId": "get_api_v8_enterprises_{enterprise}_members", "tags": [ - "AI-Hub" + "Enterprise", + "Organizations" ], "parameters": [ { - "name": "Authorization", - "in": "header", - "description": "用户个人令牌", + "name": "enterprise", + "in": "path", + "description": "企业id", "required": true, "example": "", + "schema": { + "type": "integer" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "format": "binary", - "type": "string", - "description": "音频文件 (支持 mp3, wav, m4a, flac, webm)", - "example": "" - }, - "model": { - "type": "string", - "description": "模型名称,默认为 openai/whisper-large-v3", - "example": "" - }, - "temperature": { - "description": "采样温度(0.0-1.0),默认为0.6", - "type": "string", - "example": "" - } - }, - "required": [ - "file", - "model" - ] - } + }, + { + "name": "page", + "in": "query", + "description": "当前的页码:默认为 1", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的数量,最大为 100,默认 20", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "role", + "in": "query", + "description": "根据角色筛选成员(all/admin/member)", + "required": false, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "text": { - "type": "string", - "title": "文本" - } - }, - "required": [ - "text" - ] - }, - "example": { - "text": "早上好,今天天气很好,阳光明媚我打算去公园散步,然后喝一杯咖啡,开始一天的工作" + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "html_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + } + }, + "required": [ + "avatar_url", + "html_url", + "id", + "object_id", + "login", + "name", + "url", + "user_id" + ] + }, + "active": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "role_name": { + "type": "string" + }, + "role_id": { + "type": "string" + }, + "role_name_cn": { + "type": "string" + }, + "enterprise_email": { + "type": "string" + } + }, + "required": [ + "user", + "active", + "role", + "role_name", + "role_id", + "role_name_cn" + ] + } } } }, @@ -38301,344 +41326,128 @@ "security": [] } }, - "/api/v5/detect/yolo": { + "/api/v8/enterprises/{enterprise}/memberships/{username}": { "post": { - "summary": "目标检测", + "summary": "邀请企业成员", "deprecated": false, - "description": "使用YOLO模型对图片进行目标检测,识别图片中的物体", - "operationId": "post-api-v-5-detect-yolo", + "description": "", + "operationId": "post_api_v8_enterprises_{enterprise}_memberships_{username}", "tags": [ - "AI-Hub" + "Enterprise", + "Organizations" ], "parameters": [ { - "name": "Authorization", - "in": "header", - "description": "用户个人令牌", + "name": "enterprise", + "in": "path", + "description": "企业id", + "required": true, + "example": "", + "schema": { + "type": "integer" + } + }, + { + "name": "username", + "in": "path", + "description": "用户名(username/login)", "required": true, "example": "", "schema": { "type": "string" } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "description": "", "type": "object", "properties": { - "model": { + "permission": { "type": "string", - "description": "yolo11模型权重文件名称 (yolo11n.pt, yolo11s.pt, yolo11m.pt, yolo11l.pt, yolo11x.pt)", - "examples": [ - "yolo11n.pt" - ] + "description": "成员权限: 参与者(pull),开发者(push),维护者(admin),customized(自定义角色)。默认: push" }, - "source": { + "role_id": { "type": "string", - "description": "待检测图片base64编码字符串", - "examples": [ - "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQXXXXXXX" - ] - }, - "imgsz": { - "type": "integer", - "description": "输入图像的尺寸,有效范围是 32 - 1280 像素", - "minimum": 32, - "maximum": 1280, - "examples": [ - 640 - ] - }, - "conf": { - "type": "number", - "description": "预测的置信度阈值,有效范围 0.01 - 1.0", - "minimum": 0.01, - "maximum": 1, - "examples": [ - 0.5 - ] - }, - "iou": { - "type": "number", - "description": "交并比iou阈值,有效范围 0.0 - 0.95", - "minimum": 0, - "maximum": 0.95, - "examples": [ - 0.45 - ] + "description": "角色ID, 如果permission传入了customized则需要传入角色id" } - }, - "required": [ - "model", - "source", - "imgsz", - "conf", - "iou" - ] + } }, - "example": { - "source": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/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ZjvhUL4EqcSLSer6vTmYRzRSsoU9gcR4jHmAgOGVJG90btTV0N8N/iualampaup3LwLE46B6F6lUGq6GJ45lYkD3xwP0hX1FLmkPkzNH6h+E46GeGTUmZutMGrZSCRxfFFwMRwt5j21kdnhdFyFkW45v7jGloiPywwaQrJp6SMySF7j3xJT7YsRv1i6x5ojC/TdJrfTGQH54ycC+MTwMSqBZj8r42pa3PfGlCcZMxA74Y5C2mdRjU9QOef1wkmdrHnCQu24c++GWUrCEvmmBHOG2pYre/748lkbgX4wkq3OzvhtlZJxYJHW1QUWviPV9YCpHvhZWMSTc4YawnDwFASmysrLEi+I9XVl74W1xO484YK8nY2FUZTVmtbtB5tiFZpWm7c4fM2YlmuffERzVj84eAoymLM6v1HnnEWzCqvc34w7ZkTubnEbzEmx5w9ImbMqu9+cRbMau1+cPOZMbtziKZgxJPOESJtr6rue+I7WT3Jw5ZiSAecMVUTzgQkdVPhqqJO4wpqSfnDdLhUJNKAynEazWIJMSPfEkk98R3NjeTCoTdicdPdMLVXzGpS6KbRKR3PucQhRdhg3ZQBHp2DaAtqcEWH+HAhCLPasV+bVdQCCjSELb3A4H9MJaNImqY/PJ8oG77e5Hvb64WpTxtlkchUFzNtJ+lsIQShO3jm3GBC//9k=", - "model": "yolo11n.pt", - "imgsz": 640, - "conf": 0.25, - "iou": 0.45 - } + "example": "" } } }, "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { "type": "object", "properties": { - "images": { - "type": "array", - "items": { - "description": "com.gitcode.aihub.inference.entity.dto.ObjectDetectionResp.ImageResult", - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "description": "com.gitcode.aihub.inference.entity.dto.ObjectDetectionResp.DetectionResult", - "type": "object", - "properties": { - "box": { - "description": "边界框坐标", - "type": "object", - "properties": { - "x1": { - "type": "number", - "description": "左上角x坐标", - "examples": [ - 14.55554 - ] - }, - "x2": { - "type": "number", - "description": "右下角x坐标", - "examples": [ - 72.45978 - ] - }, - "y1": { - "type": "number", - "description": "左上角y坐标", - "examples": [ - 116.72369 - ] - }, - "y2": { - "type": "number", - "description": "右下角y坐标", - "examples": [ - 268.92963 - ] - } - }, - "required": [ - "x1", - "x2", - "y1", - "y2" - ] - }, - "class": { - "type": "integer", - "description": "类别ID", - "examples": [ - 0 - ] - }, - "confidence": { - "type": "number", - "description": "置信度", - "examples": [ - 0.83583 - ] - }, - "name": { - "type": "string", - "description": "类别名称", - "examples": [ - "person" - ] - } - }, - "required": [ - "box", - "confidence", - "name" - ] - }, - "description": "检测结果列表" - }, - "shape": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "图片尺寸 [width, height]" - }, - "speed": { - "description": "处理速度信息", - "type": "object", - "properties": { - "inference": { - "type": "number", - "description": "推理时间(ms)", - "examples": [ - 56.13449 - ] - }, - "postprocess": { - "type": "number", - "description": "后处理时间(ms)", - "examples": [ - 0.05426 - ] - }, - "preprocess": { - "type": "number", - "description": "预处理时间(ms)", - "examples": [ - 21.20275 - ] - } - }, - "required": [ - "inference", - "postprocess", - "preprocess" - ] - } - }, - "required": [ - "results", - "shape", - "speed" - ] - }, - "description": "检测结果图片列表" + "followers_url": { + "type": "string" }, - "metadata": { - "description": "元数据信息", + "html_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" + }, + "permissions": { "type": "object", "properties": { - "functionTimeAlive": { - "type": "number", - "description": "函数存活时间(ms)", - "examples": [ - 163779.863 - ] - }, - "functionTimeCall": { - "type": "number", - "description": "函数调用时间(ms)", - "examples": [ - 0.57 - ] + "admin": { + "type": "integer" }, - "imageCount": { - "type": "integer", - "description": "图片数量", - "examples": [ - 1 - ] + "customized": { + "type": "integer" }, - "model": { - "type": "string", - "description": "模型名称", - "examples": [ - "yolo11n-cls.pt" - ] + "push": { + "type": "integer" }, - "version": { - "description": "版本信息", - "type": "object", - "properties": { - "python": { - "type": "string", - "description": "Python版本", - "examples": [ - "3.11.14" - ] - }, - "torch": { - "type": "string", - "description": "PyTorch版本", - "examples": [ - "2.9.1+cpu" - ] - }, - "torchvision": { - "type": "string", - "description": "torchvision版本", - "examples": [ - "0.24.1+cpu" - ] - }, - "ultralytics": { - "type": "string", - "description": "ultralytics版本", - "examples": [ - "8.3.228" - ] - } - }, - "required": [ - "python", - "ultralytics" - ] + "pull": { + "type": "integer" } - }, - "required": [ - "version" - ] + } } - }, - "required": [ - "images", - "metadata" - ] + } }, "example": { - "images": [ - { - "results": [ - { - "box": { - "x1": 1.511962890625, - "x2": 263.31793212890625, - "y1": 0.378143310546875, - "y2": 200.42999267578125 - }, - "confidence": 0.6070891618728638, - "name": "person" - } - ], - "shape": [ - 203, - 320 - ], - "speed": { - "inference": 235.26057600975037, - "postprocess": 1.4520995318889618, - "preprocess": 3.9573051035404205 - } - } - ], - "metadata": { - "version": { - "python": "3.11.13", - "ultralytics": "8.3.231" - } + "followers_url": "https://api.gitcode.com/api/v5/users/xiaogang2/followers", + "html_url": "https://gitcode.com/xiaogang2", + "id": "65ffca965079ba0d1c00f6f2", + "login": "xiaogang2", + "name": "肖刚2", + "type": "User", + "url": "https://api.gitcode.com/api/v5/xiaogang2", + "permissions": { + "admin": false, + "customized": true, + "push": true, + "pull": true } } } @@ -38649,103 +41458,65 @@ "security": [] } }, - "/api/v5/video/generate": { - "post": { - "summary": "图像生成视频(创建任务)", + "/api/v8/org/{org}/enterprise": { + "get": { + "summary": "获取组织关联的企业", "deprecated": false, - "description": "调用此接口创建视频生成任务,如果没有异常返回,可根据 requestId 进行异步视频结果查询。", - "operationId": "post-api-v-5-video-generate", + "description": "", + "operationId": "get_api_v8_org_{org}_enterprise", "tags": [ - "AI-Hub" + "Enterprise" ], "parameters": [ { - "name": "Authorization", - "in": "header", - "description": "用户个人令牌", + "name": "org", + "in": "path", + "description": "组织的路径", "required": true, "example": "", "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "img_url", - "model", - "prompt" - ], - "type": "object", - "properties": { - "img_url": { - "type": "string", - "description": "支持输入 Base64 或图片 URL", - "examples": [ - "https://cdn-static.gitcode.com/_nuxtaihub/chatexample_67.png" - ] - }, - "model": { - "type": "string", - "description": "模型名称", - "examples": [ - "Wan2.2-I2V-A14B" - ] - }, - "prompt": { - "type": "string", - "description": "提示词", - "examples": [ - "小猫在散步" - ] - }, - "seed": { - "type": "integer", - "description": "随机种子,范围 0-2147483648", - "format": "int64", - "default": 0, - "examples": [ - 0 - ] - } - }, - "description": "" - }, - "example": { - "model": "Wan2.2-I2V-A14B", - "prompt": "魔术师手中飞出漫天纸牌,掌心迸射炫彩光芒,无数彩色纸片与礼花随之洒落,缤纷闪耀。", - "img_url": "https://cdn-static.gitcode.com/_nuxtaihub/chatexample_67.png", - "seed": 0 - } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { "type": "object", "properties": { - "request_id": { - "type": "string", - "description": "请求ID" - }, - "status": { - "type": "string", - "description": "处理状态", - "examples": [ - "running" - ] + "id": { + "type": "integer" }, - "error_message": { - "type": "string", - "description": "错误信息(仅异常时出现)" + "name": { + "type": "string" } + }, + "required": [ + "id", + "name" + ] + }, + "example": { + "active": true, + "role": "member", + "url": "https://api.gitcode.com/api/v5/enterprises/litestabc/members/malongge5", + "user": { + "id": 953, + "login": "malongge5", + "url": "https://api.gitcode.com/api/v5/malongge5", + "html_url": "https://gitcode.com/malongge5" } } } @@ -38756,83 +41527,81 @@ "security": [] } }, - "/api/v5/video/status": { - "post": { - "summary": "图像生成视频(查询状态)", + "/api/v8/enterprise/{enterprise_id}/customized_roles": { + "get": { + "summary": "获取企业自定义角色", "deprecated": false, - "description": "根据 requestId查询视频生成状态。", - "operationId": "post-api-v-5-video-status", + "description": "", + "operationId": "get_api_v8_enterprise_{enterprise_id}_customized_roles", "tags": [ - "AI-Hub" + "Enterprise" ], "parameters": [ { - "name": "Authorization", - "in": "header", - "description": "用户个人令牌", + "name": "enterprise_id", + "in": "path", + "description": "企业id", "required": true, "example": "", "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "request_id" - ], - "type": "object", - "properties": { - "request_id": { - "type": "string", - "description": "请求ID", - "examples": [ - "009522a671394f3f5ac02c63b1a62662" - ] - } - }, - "description": "" - }, - "example": "" + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "request_id": { - "type": "string", - "description": "请求ID(有效时长为 24h,请尽快获取结果)" - }, - "status": { - "type": "string", - "description": "处理状态(running,failed,succeeded)", - "examples": [ - "succeeded" - ] - }, - "video_url": { - "type": "string", - "description": "视频URL(仅成功返回,且有效时长为 10 分钟)" - }, - "error_message": { - "type": "string", - "description": "错误信息(仅异常时出现)" + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "name_cn": { + "type": "string" + }, + "product_id": { + "type": "string" + }, + "access_level": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "role_type": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mgnt_mode": { + "type": "integer" + }, + "member_count": { + "type": "integer" + } } } - }, - "example": { - "request_id": "2600c2714f184f9087060b014fb2f7a3", - "status": "succeeded", - "video_url": "https://ai-inference-cdn-static.gitcode.com/video-2600c2714f184f9087060b014fb2f7a3-output.mp4?auth_key=1765510460-86c58596bd5944b1af78aa3587cfb902-0-44a97eda8e44774e561eaced4dd124865c7855ca2e251f3099b3ec3aea77c62b" } } }, @@ -38842,31 +41611,31 @@ "security": [] } }, - "/api/v5/audio/classification": { + "/api/v8/enterprises/{enterprise}/milestones": { "post": { - "summary": "音频分类", + "summary": "创建企业里程碑", "deprecated": false, - "description": "对音频文件进行情感分类识别", - "operationId": "post-api-v-5-audio-classification", + "description": "", + "operationId": "post_api_v8_enterprise_{enterprise_id}_milestones", "tags": [ - "AI-Hub" + "Enterprise" ], "parameters": [ { - "name": "model", - "in": "query", - "description": "模型名称,默认为 audeering/wav2vec2-large-robust-12-ft-emotion-msp-dim", + "name": "enterprise", + "in": "path", + "description": "企业id", "required": true, + "example": "", "schema": { "type": "string" } }, { - "name": "Authorization", - "in": "header", - "description": "用户个人令牌", + "name": "access_token", + "in": "query", + "description": "用户授权码", "required": true, - "example": "", "schema": { "type": "string" } @@ -38874,149 +41643,100 @@ ], "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { "type": "object", "properties": { - "file": { + "title": { "type": "string", - "format": "binary", - "description": "音频文件 (支持 mp3, wav)", - "example": "" + "description": "名称" + }, + "description": { + "type": "string", + "description": "描述" + }, + "start_date": { + "type": "string", + "description": "开始时间, 格式%Y-%m-%d" + }, + "due_date": { + "type": "string", + "description": "截止时间, 格式%Y-%m-%d" + }, + "projects": { + "type": "array", + "items": { + "type": "integer", + "description": "项目id" + }, + "description": "关联的项目" } }, "required": [ - "file" + "title" ] - } + }, + "example": "" } } }, "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { "type": "object", "properties": { - "vector": { - "type": "number", - "description": "音频文件的向量表示" + "id": { + "type": "integer", + "title": "id" }, - "emotion_class": { - "type": "object", - "properties": { - "arousal": { - "type": "number", - "description": "唤醒度分数(情感激活程度:如兴奋/平静)" - }, - "dominance": { - "type": "number", - "description": "支配度分数(情感控制感:如支配/顺从)" - }, - "valence": { - "type": "number", - "description": "效价分数(情感正负向:如愉悦/不悦)\t" - } - } + "title": { + "type": "string", + "title": "标题" }, - "emotionItems": { + "description": { + "type": "string", + "title": "描述" + }, + "state": { + "type": "string", + "title": "状态" + }, + "created_at": { + "type": "string", + "title": "创建时间" + }, + "updated_at": { + "type": "string", + "title": "更新时间" + }, + "due_date": { + "type": "string", + "title": "截止时间" + }, + "start_date": { + "type": "string", + "title": "开始时间" + }, + "projects": { "type": "array", "items": { - "description": "情感分类项(格式化后)", - "type": "object", - "properties": { - "label": { - "type": "string", - "description": "分类名称", - "examples": [ - "激动程度" - ] - }, - "labelEn": { - "type": "string", - "description": "分类名称(英文)", - "examples": [ - "Arousal" - ] - }, - "value": { - "type": "string", - "description": "数值", - "examples": [ - "0.6820112466812134" - ] - }, - "valueDesc": { - "type": "string", - "description": "数值描述", - "examples": [ - "偏激动" - ] - }, - "valueDescEn": { - "type": "string", - "description": "数值描述(英文)", - "examples": [ - "slightly excited" - ] - } - } - }, - "description": "情感分类结果列表(格式化后)" - } - } - }, - "examples": { - "1": { - "summary": "成功示例", - "value": { - "vector": null, - "emotion_class": { - "arousal": 0.38037118315696716, - "dominance": 0.4589272439479828, - "valence": 0.5078083276748657 + "type": "string" }, - "emotion_items": [ - { - "label": "激动程度", - "label_en": "Arousal", - "value": "0.38037118315696716", - "value_desc": "偏平静", - "value_desc_en": "Calm" - }, - { - "label": "情绪正负", - "label_en": "Valence", - "value": "0.5078083276748657", - "value_desc": "中性", - "value_desc_en": "Neutral" - }, - { - "label": "控制感", - "label_en": "Dominance", - "value": "0.4589272439479828", - "value_desc": "中性", - "value_desc_en": "Medium Control" - } - ] + "title": "关联的项目列表" } }, - "2": { - "summary": "成功示例", - "value": { - "emotionItems": [ - { - "label": "", - "labelEn": "", - "value": "", - "valueDesc": "", - "valueDescEn": "" - } - ] - } - } + "required": [ + "id", + "title", + "description", + "state", + "created_at", + "updated_at", + "projects" + ] } } }, @@ -39024,75 +41744,296 @@ } }, "security": [] - } - }, - "/api/v5/image/generate": { - "post": { - "summary": "生成图像", + }, + "get": { + "summary": "获取企业里程碑列表", "deprecated": false, - "description": "生成图像\n根据提示词生成图像,支持文本和图片审核", + "description": "", + "operationId": "get_api_v8_enterprise_{enterprise_id}_milestones", "tags": [ - "AI-Hub" + "Enterprise" ], - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageGenerationReq", - "description": "" - }, - "example": { - "model": "hf_mirrors/Kwai-Kolors/Kolors", - "prompt": "生成一只小猫", - "seed": 1234516789, - "num_inference_steps": 20, - "guidance_scale": 4, - "cfg": 1 - } + "parameters": [ + { + "name": "enterprise", + "in": "path", + "description": "企业id", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "名称", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "in": "query", + "description": "状态", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "order_by", + "in": "query", + "description": "排序字段。可选:updated_at", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "排序方式。降序:desc;升序:asc", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前的页码:默认为 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的数量,最大为 100,默认 20", + "required": false, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseEntityImageGenerationResp" - }, - "example": { - "images": [ - "" - ], - "request_id": "", - "status": "", - "error_message": "", - "processing_time": 0 + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "id" + }, + "title": { + "type": "string", + "title": "标题" + }, + "description": { + "type": "string", + "title": "描述" + }, + "state": { + "type": "string", + "title": "状态" + }, + "created_at": { + "type": "string", + "title": "创建时间" + }, + "updated_at": { + "type": "string", + "title": "更新时间" + }, + "due_date": { + "type": "string", + "title": "截止时间" + }, + "start_date": { + "type": "string", + "title": "开始时间" + }, + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "项目id" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string", + "title": "项目名称" + }, + "name_with_namespace": { + "type": "string" + }, + "path": { + "type": "string", + "title": "项目路径" + }, + "path_with_namespace": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "archived": { + "type": "boolean" + } + }, + "required": [ + "id", + "description", + "name", + "name_with_namespace", + "path", + "path_with_namespace", + "created_at", + "updated_at", + "archived" + ] + }, + "title": "关联的项目列表" + } + }, + "required": [ + "id", + "title", + "state", + "created_at", + "updated_at", + "description", + "projects" + ] + } } } }, - "headers": {} + "headers": { + "total_count": { + "required": false, + "description": "总数量", + "schema": { + "type": "string" + } + }, + "total_page": { + "required": false, + "description": "总页数", + "schema": { + "type": "string" + } + } + } } }, "security": [] } }, - "/api/v5/audio/speech": { - "post": { - "summary": "文本转语音", + "/api/v8/enterprises/{enterprise}/milestones/{milestone_id}": { + "put": { + "summary": "修改企业里程碑", "deprecated": false, - "description": "文本转语音", + "description": "", + "operationId": "put_api_v8_enterprise_{enterprise_id}_milestones_{milestone_id}", "tags": [ - "AI-Hub" + "Enterprise" + ], + "parameters": [ + { + "name": "enterprise", + "in": "path", + "description": "企业id", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "milestone_id", + "in": "path", + "description": "里程碑id", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": true, + "schema": { + "type": "string" + } + } ], - "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TextToSpeechReq", - "description": "" + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "名称" + }, + "description": { + "type": "string", + "description": "描述" + }, + "start_date": { + "type": "string", + "description": "开始时间, 格式%Y-%m-%d" + }, + "due_date": { + "type": "string", + "description": "截止时间, 格式%Y-%m-%d" + }, + "state_event": { + "type": "string", + "description": "里程碑状态。开启:active;关闭:closed" + }, + "projects": { + "type": "array", + "items": { + "type": "integer", + "description": "项目id" + }, + "description": "关联的项目" + } + }, + "required": [ + "title" + ] }, "example": "" } @@ -39100,36 +42041,82 @@ }, "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { "type": "object", - "properties": {} - }, - "example": {} + "properties": { + "id": { + "type": "integer", + "title": "id" + }, + "title": { + "type": "string", + "title": "标题" + }, + "description": { + "type": "string", + "title": "描述" + }, + "state": { + "type": "string", + "title": "状态" + }, + "created_at": { + "type": "string", + "title": "创建时间" + }, + "updated_at": { + "type": "string", + "title": "更新时间" + }, + "due_date": { + "type": "string", + "title": "截止时间" + }, + "start_date": { + "type": "string", + "title": "开始时间" + }, + "projects": { + "type": "array", + "items": { + "type": "string" + }, + "title": "关联的项目列表" + } + }, + "required": [ + "id", + "title", + "description", + "state", + "created_at", + "updated_at", + "projects" + ] + } } }, "headers": {} } }, "security": [] - } - }, - "/api/v5/org/{owner}/kanban/list": { + }, "get": { - "summary": "获取组织看板列表", + "summary": "获取企业里程碑详情", "deprecated": false, "description": "", - "operationId": "get_api_v5_org_{owner}_kanban_list", + "operationId": "get_api_v8_enterprise_{enterprise_id}_milestones_{milestone_id}", "tags": [ - "KanBan" + "Enterprise" ], "parameters": [ { - "name": "owner", + "name": "enterprise", "in": "path", - "description": "组织的路径", + "description": "企业id", "required": true, "example": "", "schema": { @@ -39137,64 +42124,21 @@ } }, { - "name": "access_token", - "in": "query", - "description": "用户授权码", + "name": "milestone_id", + "in": "path", + "description": "里程碑id", "required": true, + "example": "", "schema": { "type": "string" } }, { - "name": "status", - "in": "query", - "description": "状态 0: 正常 1:关闭,默认不传为全部", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "sort", - "in": "query", - "description": "最新: newest, 最老: oldest ", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "visibility", - "in": "query", - "description": "可见性 1:公开的 2: 私密的", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "search", - "in": "query", - "description": "按照名称搜索", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "当前页码", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "per_page", + "name": "access_token", "in": "query", - "description": "每页数量", - "required": false, + "description": "用户授权码", + "required": true, + "example": "", "schema": { "type": "string" } @@ -39202,65 +42146,60 @@ ], "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { "type": "object", "properties": { - "close_count": { - "type": "integer" + "id": { + "type": "integer", + "title": "id" }, - "open_count": { - "type": "integer" + "title": { + "type": "string", + "title": "标题" }, - "all_count": { - "type": "integer" + "description": { + "type": "string", + "title": "描述" }, - "content": { + "state": { + "type": "string", + "title": "状态" + }, + "created_at": { + "type": "string", + "title": "创建时间" + }, + "updated_at": { + "type": "string", + "title": "更新时间" + }, + "due_date": { + "type": "string", + "title": "截止时间" + }, + "start_date": { + "type": "string", + "title": "开始时间" + }, + "projects": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "iid": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "visibility": { - "type": "integer" - }, - "updated_at": { - "type": "string" - } - }, - "required": [ - "id", - "iid", - "name", - "description", - "status", - "visibility", - "updated_at" - ] - } + "type": "string" + }, + "title": "关联的项目列表" } }, "required": [ - "close_count", - "open_count", - "all_count", - "content" + "id", + "title", + "description", + "state", + "created_at", + "updated_at", + "projects" ] } } @@ -39269,42 +42208,20 @@ } }, "security": [] - } - }, - "/org/{owner}/kanban/repo/{repo}/{type}/{iid}": { - "put": { - "summary": "更新Issue或者Pull Request关联的看板", + }, + "delete": { + "summary": "删除企业里程碑", "deprecated": false, "description": "", - "operationId": "put_api_v5_org_{owner}_kanban_repo_{repo}_{type}_{iid}", + "operationId": "delete_api_v8_enterprise_{enterprise_id}_milestones_{milestone_id}", "tags": [ - "KanBan" + "Enterprise" ], "parameters": [ { - "name": "owner", - "in": "path", - "description": "组织的路径", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库的路径", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "type", + "name": "enterprise", "in": "path", - "description": "类型,issue/merge_request", + "description": "企业id", "required": true, "example": "", "schema": { @@ -39312,9 +42229,9 @@ } }, { - "name": "iid", + "name": "milestone_id", "in": "path", - "description": "issue或者pull request的iid", + "description": "里程碑id", "required": true, "example": "", "schema": { @@ -39325,40 +42242,19 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": false, + "required": true, + "example": "", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "kanban_id": { - "type": "string", - "description": "看板id" - } - }, - "required": [ - "kanban_id" - ] - }, - "example": "" - } - } - }, "responses": { "200": { - "description": "", + "description": "成功响应", "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } + "*/*": { + "schema": {} } }, "headers": {} @@ -39367,20 +42263,20 @@ "security": [] } }, - "/org/{owner}/kanban/{kanban_id}/remove_item": { - "delete": { - "summary": "删除看板关联的Issue或者Pull Request", + "/api/v8/enterprises/{enterprise}/groups/projects": { + "get": { + "summary": "获取企业里程碑可以关联的项目列表", "deprecated": false, "description": "", - "operationId": "delete_api_v5_org_{owner}_kanban_{kanban_id}_remove_item", + "operationId": "get_api_v8_enterprise_{enterprise_id}_groups_projects", "tags": [ - "KanBan" + "Enterprise" ], "parameters": [ { - "name": "owner", + "name": "enterprise", "in": "path", - "description": "组织的路径", + "description": "企业id", "required": true, "example": "", "schema": { @@ -39388,105 +42284,111 @@ } }, { - "name": "kanban_id", - "in": "path", - "description": "看板id", + "name": "access_token", + "in": "query", + "description": "用户授权码", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "access_token", + "name": "group_name", "in": "query", - "description": "用户授权码", + "description": "组织名称", "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "issue_pr_iids": { + "responses": { + "200": { + "description": "成功响应", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "type": "object", "properties": { - "owner": { + "id": { + "type": "integer", + "title": "id" + }, + "full_name": { "type": "string", - "description": "组织的路径" + "title": "包含namespace的路径" }, - "repo": { + "human_name": { "type": "string", - "description": "仓库的路径" + "title": "包含namespace的名称" }, - "issue_iids": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "仓库内issue的iid" + "path": { + "type": "string", + "title": "项目路径" }, - "pr_iids": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "仓库内pull request的iid" + "name": { + "type": "string", + "title": "项目名称" + }, + "created_at": { + "type": "string", + "title": "创建时间" + }, + "updated_at": { + "type": "string", + "title": "更新时间" } }, "required": [ - "owner", - "repo", - "issue_iids", - "pr_iids" - ], - "description": "要删的issue或者pull request信息" + "id", + "full_name", + "human_name", + "path", + "name", + "created_at", + "updated_at" + ] } - }, - "required": [ - "issue_pr_iids" - ] + } + } + }, + "headers": { + "total_count": { + "required": false, + "description": "总数量", + "schema": { + "type": "string" + } }, - "example": "" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { + "total_page": { + "required": false, + "description": "总页数", "schema": { - "type": "object", - "properties": {} + "type": "string" } } - }, - "headers": {} + } } }, "security": [] } }, - "/api/v5/org/{owner}/kanban/{kanban_id}/detail": { + "/api/v8/enterprises/{enterprise_id}/issue_extend_field": { "get": { - "summary": "获取单个看板详情", + "summary": "获取企业Issue自定义字段列表", "deprecated": false, "description": "", - "operationId": "get_api_v5_org_{owner}_kanban_{id}_detail", + "operationId": "get_api_v8_enterprises_{enterprises_id}_issue_extend_field", "tags": [ - "KanBan" + "Enterprise" ], "parameters": [ { - "name": "owner", + "name": "enterprise_id", "in": "path", - "description": "组织的路径", + "description": "企业id", "required": true, "example": "", "schema": { @@ -39494,19 +42396,27 @@ } }, { - "name": "kanban_id", - "in": "path", - "description": "看板id", + "name": "access_token", + "in": "query", + "description": "用户授权码", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "access_token", + "name": "page", "in": "query", - "description": "用户授权码", + "description": "当前的页码:默认为 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的数量,最大为 100,默认 20", "required": false, "schema": { "type": "string" @@ -39515,68 +42425,296 @@ ], "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "status": { - "type": "integer" + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "id" + }, + "name": { + "type": "string", + "description": "字段名称" + }, + "description": { + "type": "string", + "description": "字段描述" + }, + "field_type": { + "type": "string", + "description": "自定义字段的类型。text_single:单行文本,text_multi:多行文本,integer:整数,decimal:小数,date:日期,select_single:单选下拉,select_multi:多选下拉,member_single:单选成员,member_multi:多选成员" + }, + "field_visibility": { + "type": "integer", + "description": "可见性。0:仅管理员可见,1:所有人可见" + }, + "created_time": { + "type": "string", + "description": "创建时间" + }, + "updated_time": { + "type": "string", + "description": "更新时间" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "extend_field_id": { + "type": "integer" + }, + "sort_num": { + "type": "integer" + }, + "field_value": { + "type": "string" + }, + "created_time": { + "type": "string" + }, + "updated_time": { + "type": "string" + } + }, + "required": [ + "id", + "extend_field_id", + "sort_num", + "field_value", + "created_time", + "updated_time" + ] + }, + "description": "选项明细,仅选项类型返回" + }, + "types": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "sort_num": { + "type": "integer" + }, + "kind": { + "type": "integer" + } + }, + "required": [ + "id", + "name", + "desc", + "enabled", + "sort_num", + "kind" + ] + }, + "description": "该字段关联的issue类型列表" + } }, - "visibility": { - "type": "integer" + "required": [ + "id", + "name", + "description", + "field_type", + "field_visibility", + "created_time", + "updated_time", + "options", + "types" + ] + } + }, + "examples": { + "1": { + "summary": "成功示例", + "value": { + "id": 48, + "name": "多选下拉", + "description": "", + "field_type": "select_multi", + "field_visibility": 0, + "created_time": "2025-12-18T14:50:25+08:00", + "updated_time": "2025-12-18T14:50:25+08:00", + "options": [ + { + "id": 51, + "extend_field_id": 48, + "sort_num": 9999, + "field_value": "1", + "created_time": "2025-12-18T14:50:34+08:00", + "updated_time": "2025-12-18T14:50:34+08:00" + }, + { + "id": 52, + "extend_field_id": 48, + "sort_num": 9999, + "field_value": "2", + "created_time": "2025-12-18T14:50:36+08:00", + "updated_time": "2025-12-18T14:50:36+08:00" + }, + { + "id": 53, + "extend_field_id": 48, + "sort_num": 9999, + "field_value": "3", + "created_time": "2025-12-18T14:50:38+08:00", + "updated_time": "2025-12-18T14:50:38+08:00" + }, + { + "id": 54, + "extend_field_id": 48, + "sort_num": 9999, + "field_value": "4", + "created_time": "2025-12-18T14:50:41+08:00", + "updated_time": "2025-12-18T14:50:41+08:00" + } + ], + "types": [ + { + "id": 425, + "name": "需求", + "desc": "", + "enabled": true, + "sort_num": 1, + "kind": 0 + } + ] } }, - "required": [ - "id", - "name", - "description", - "status", - "visibility" - ] + "2": { + "summary": "成功示例", + "value": { + "id": 47, + "name": "test3", + "description": "", + "field_type": "select_single", + "field_visibility": 1, + "created_time": "2025-12-18T10:58:24+08:00", + "updated_time": "2025-12-18T10:58:24+08:00", + "options": [ + { + "id": 49, + "extend_field_id": 47, + "sort_num": 9999, + "field_value": "1", + "created_time": "2025-12-18T10:58:58+08:00", + "updated_time": "2025-12-18T10:58:58+08:00" + }, + { + "id": 50, + "extend_field_id": 47, + "sort_num": 9999, + "field_value": "2", + "created_time": "2025-12-18T10:59:02+08:00", + "updated_time": "2025-12-18T10:59:02+08:00" + } + ], + "types": [ + { + "id": 425, + "name": "需求", + "desc": "", + "enabled": true, + "sort_num": 1, + "kind": 0 + } + ] + } + }, + "3": { + "summary": "成功示例", + "value": { + "id": 46, + "name": "test2", + "description": "1", + "field_type": "text_single", + "field_visibility": 1, + "created_time": "2025-12-18T10:57:54+08:00", + "updated_time": "2025-12-18T10:57:54+08:00", + "types": [] + } + }, + "4": { + "summary": "成功示例", + "value": { + "id": 45, + "name": "test1", + "description": "", + "field_type": "text_single", + "field_visibility": 0, + "created_time": "2025-12-18T10:46:51+08:00", + "updated_time": "2026-01-07T09:22:17+08:00", + "types": [ + { + "id": 425, + "name": "需求", + "desc": "", + "enabled": true, + "sort_num": 1, + "kind": 0 + } + ] + } + } } } }, - "headers": {} + "headers": { + "total_count": { + "required": false, + "description": "总数量", + "schema": { + "type": "string" + } + }, + "total_page": { + "required": false, + "description": "总页数", + "schema": { + "type": "string" + } + } + } } }, "security": [] } }, - "/api/v5/org/{owner}/kanban/{kanban_id}/add_item": { + "/api/v8/enterprises/{enterprise_id}/issues": { "post": { - "summary": "添加Issue或者Pull Request到看板", + "summary": "获取企业Issue列表", "deprecated": false, "description": "", - "operationId": "post_api_v5_org_{owner}_kanban_{id}_add_item", + "operationId": "post_api_v8_enterprises_{enterprises_id}_issues", "tags": [ - "KanBan" + "Enterprise" ], "parameters": [ { - "name": "owner", - "in": "path", - "description": "组织的路径", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "kanban_id", + "name": "enterprise_id", "in": "path", - "description": "看板id", + "description": "企业id", "required": true, "example": "", "schema": { @@ -39587,7 +42725,7 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": false, + "required": true, "schema": { "type": "string" } @@ -39599,269 +42737,598 @@ "schema": { "type": "object", "properties": { - "repo": { + "page": { + "type": "integer", + "description": "当前的页码:默认为 1" + }, + "per_page": { + "type": "integer", + "description": "每页的数量,最大为 100,默认 20" + }, + "labels": { "type": "string", - "description": "仓库的路径" + "description": "标签,多个按英文逗号隔开" }, - "issue_iids": { + "sort": { + "type": "string", + "description": "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" + }, + "direction": { + "type": "string", + "description": "排序方式: 升序(asc),降序(desc)。默认: desc" + }, + "since": { + "type": "string", + "description": "起始的更新时间,要求时间格式为 ISO 8601" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "description": "负责人的用户名" + }, + "milestone_ids": { "type": "array", "items": { "type": "integer" }, - "description": "仓库内issue的iid" + "description": "企业里程碑id" }, - "pr_iids": { + "project_ids": { "type": "array", "items": { "type": "integer" }, - "description": "仓库内pull request的iid" - } - }, - "required": [ - "repo", - "issue_iids", - "pr_iids" - ] - }, - "example": "" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/api/v5/org/{owner}/kanban/repo/{repo}/{type}/{iid}": { - "put": { - "summary": "更新Issue或者Pull Request关联的看板", - "deprecated": false, - "description": "", - "operationId": "put_api_v5_org_{owner}_kanban_repo_{repo}_{type}_{iid}_new", - "tags": [ - "KanBan" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "组织的路径", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "仓库的路径", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "path", - "description": "类型,issue/merge_request", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "iid", - "in": "path", - "description": "issue或者pull request的iid", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": false, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "kanban_id": { + "description": "项目id" + }, + "create_at": { "type": "string", - "description": "看板id" + "description": "任务创建日期,格式2024-11-09" + }, + "created_before": { + "type": "string", + "description": "任务创建截止时间,格式2024-11-09" + }, + "search": { + "type": "string", + "description": "通过关键字搜索issue标题" + }, + "issue_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "issue自定义类型" + }, + "issue_states": { + "type": "array", + "items": { + "type": "string" + }, + "description": "issue自定义状态" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field_name": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + }, + "operation": { + "type": "string", + "description": "操作类型,可选值:search(模糊搜索), greater_equal(大于等于), less_equal(小于等于), between(在什么之间), in(精确匹配)" + } + }, + "required": [ + "operation" + ] + } } - }, - "required": [ - "kanban_id" - ] - }, - "example": "" + } + } } } }, "responses": { "200": { - "description": "", + "description": "成功响应", "content": { "application/json": { "schema": { - "type": "object", - "properties": {} - } - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/api/v5/org/{owner}/kanban/{kanban_id}/remove_item": { - "delete": { - "summary": "删除看板关联的Issue或者Pull Request", - "deprecated": false, - "description": "", - "operationId": "delete_api_v5_org_{owner}_kanban_{kanban_id}_remove_item_new", - "tags": [ - "KanBan" - ], - "parameters": [ - { - "name": "owner", - "in": "path", - "description": "组织的路径", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "kanban_id", - "in": "path", - "description": "看板id", - "required": true, - "example": "", - "schema": { - "type": "string" - } - }, - { - "name": "access_token", - "in": "query", - "description": "用户授权码", - "required": false, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "repo": { - "type": "string", - "description": "仓库的路径" - }, - "issue_iids": { - "type": "array", - "items": { - "type": "integer" + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "id" }, - "description": "仓库内issue的iid" - }, - "pr_iids": { - "type": "array", - "items": { + "html_url": { + "type": "string" + }, + "number": { + "type": "string" + }, + "state": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "object_id", + "login", + "name" + ], + "description": "作者" + }, + "repository": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "full_name": { + "type": "string" + }, + "human_name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "assigner": { + "type": "object", + "properties": {} + }, + "paas": { + "type": "string" + } + }, + "required": [ + "id", + "full_name", + "human_name", + "path", + "name", + "url", + "assigner", + "paas" + ], + "description": "仓库信息" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "finished_at": { + "type": "string" + }, + "deadline": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "color" + ] + } + }, + "issue_state": { + "type": "string", + "description": "issue自定义状态" + }, + "comments": { "type": "integer" }, - "description": "仓库内pull request的iid" + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field_name": { + "type": "string" + }, + "field_values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "field_name", + "field_values" + ] + }, + "description": "issue自定义字段" + }, + "issue_type": { + "type": "string", + "description": "issue类型" + }, + "issue_priority": { + "type": "string", + "description": "issue优先级" + }, + "url": { + "type": "string" + }, + "repository_url": { + "type": "string" + }, + "visibility_reason": { + "type": "string", + "description": "可见性,public:公开可见,confidential:私密,项目成员可见,other:其他原因导致的仅项目成员可见" + }, + "related_branches": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联的分支列表" + }, + "linked_pulls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "number": { + "type": "integer" + }, + "html_url": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url" + ] + }, + "id": { + "type": "integer" + }, + "project_id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "state": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "merged_at": { + "type": "string" + }, + "merged_by": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "html_url": { + "type": "string" + } + }, + "required": [ + "id", + "login", + "name", + "avatar_url", + "html_url" + ] + }, + "closed_at": { + "type": "string" + }, + "target_branch": { + "type": "string" + }, + "source_branch": { + "type": "string" + }, + "source_project_id": { + "type": "integer" + }, + "target_project_id": { + "type": "integer" + } + }, + "required": [ + "number", + "html_url", + "user", + "id", + "project_id", + "title", + "body", + "state", + "created_at", + "updated_at", + "merged_at", + "merged_by", + "closed_at", + "target_branch", + "source_branch", + "source_project_id", + "target_project_id" + ] + }, + "description": "关联的pull_request列表" + } + } + } + }, + "examples": { + "1": { + "summary": "成功示例", + "value": { + "id": 48, + "name": "多选下拉", + "description": "", + "field_type": "select_multi", + "field_visibility": 0, + "created_time": "2025-12-18T14:50:25+08:00", + "updated_time": "2025-12-18T14:50:25+08:00", + "options": [ + { + "id": 51, + "extend_field_id": 48, + "sort_num": 9999, + "field_value": "1", + "created_time": "2025-12-18T14:50:34+08:00", + "updated_time": "2025-12-18T14:50:34+08:00" + }, + { + "id": 52, + "extend_field_id": 48, + "sort_num": 9999, + "field_value": "2", + "created_time": "2025-12-18T14:50:36+08:00", + "updated_time": "2025-12-18T14:50:36+08:00" + }, + { + "id": 53, + "extend_field_id": 48, + "sort_num": 9999, + "field_value": "3", + "created_time": "2025-12-18T14:50:38+08:00", + "updated_time": "2025-12-18T14:50:38+08:00" + }, + { + "id": 54, + "extend_field_id": 48, + "sort_num": 9999, + "field_value": "4", + "created_time": "2025-12-18T14:50:41+08:00", + "updated_time": "2025-12-18T14:50:41+08:00" + } + ], + "types": [ + { + "id": 425, + "name": "需求", + "desc": "", + "enabled": true, + "sort_num": 1, + "kind": 0 + } + ] + } + }, + "2": { + "summary": "成功示例", + "value": { + "id": 47, + "name": "test3", + "description": "", + "field_type": "select_single", + "field_visibility": 1, + "created_time": "2025-12-18T10:58:24+08:00", + "updated_time": "2025-12-18T10:58:24+08:00", + "options": [ + { + "id": 49, + "extend_field_id": 47, + "sort_num": 9999, + "field_value": "1", + "created_time": "2025-12-18T10:58:58+08:00", + "updated_time": "2025-12-18T10:58:58+08:00" + }, + { + "id": 50, + "extend_field_id": 47, + "sort_num": 9999, + "field_value": "2", + "created_time": "2025-12-18T10:59:02+08:00", + "updated_time": "2025-12-18T10:59:02+08:00" + } + ], + "types": [ + { + "id": 425, + "name": "需求", + "desc": "", + "enabled": true, + "sort_num": 1, + "kind": 0 + } + ] + } + }, + "3": { + "summary": "成功示例", + "value": { + "id": 46, + "name": "test2", + "description": "1", + "field_type": "text_single", + "field_visibility": 1, + "created_time": "2025-12-18T10:57:54+08:00", + "updated_time": "2025-12-18T10:57:54+08:00", + "types": [] } }, - "required": [ - "repo", - "issue_iids", - "pr_iids" - ] + "4": { + "summary": "成功示例", + "value": { + "id": 45, + "name": "test1", + "description": "", + "field_type": "text_single", + "field_visibility": 0, + "created_time": "2025-12-18T10:46:51+08:00", + "updated_time": "2026-01-07T09:22:17+08:00", + "types": [ + { + "id": 425, + "name": "需求", + "desc": "", + "enabled": true, + "sort_num": 1, + "kind": 0 + } + ] + } + } + } + } + }, + "headers": { + "total_count": { + "required": false, + "description": "总数量", + "schema": { + "type": "string" } }, - "example": "" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { + "total_page": { + "required": false, + "description": "总页数", "schema": { - "type": "object", - "properties": {} + "type": "string" } } - }, - "headers": {} + } } }, "security": [] } }, - "/api/v5/org/{owner}/kanban/{kanban_id}/item_list": { + "/api/v8/repos/{owner}/{repo}/actions/runs": { "get": { - "summary": "获取看板内容列表", + "summary": "获取仓库所有的流水线的运行记录", "deprecated": false, "description": "", - "operationId": "get_api_v5_org_{owner}_kanban_{kanban_id}_item_list", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_runs", "tags": [ - "KanBan" + "action" ], "parameters": [ { "name": "owner", "in": "path", - "description": "组织的路径", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "kanban_id", + "name": "repo", "in": "path", - "description": "看板id", + "description": "仓库路径(path)", "required": true, - "example": "", "schema": { "type": "string" } @@ -39871,60 +43338,68 @@ "in": "query", "description": "用户授权码", "required": false, - "example": "", "schema": { "type": "string" } }, { - "name": "repo", + "name": "event", "in": "query", - "description": "仓库路径", + "description": "触发事件类型,MR(mr事件),Push(推送事件),Manual(手动触发)", "required": false, "schema": { "type": "string" } }, { - "name": "source_type", + "name": "status", "in": "query", - "description": "来源类型:issue/merge_request", + "description": "运行状态,COMPLETED(已完成),RUNNING(运行中),FAILED(失败),CANCELED(取消),IGNORED(忽略),PAUSED(暂停),SUSPEND(挂起)", "required": false, "schema": { "type": "string" } }, { - "name": "source_status", + "name": "branch", "in": "query", - "description": "来源状态:opened/closed/merged", + "description": "分支过滤", "required": false, "schema": { "type": "string" } }, { - "name": "title", + "name": "executor", "in": "query", - "description": "标题", + "description": "触发人用户名", "required": false, "schema": { "type": "string" } }, { - "name": "source_iids", + "name": "pull_request_id", "in": "query", - "description": "使用pr或者issue的iid进行查询, 使用该参数必须填写repo参数,否则不生效", + "description": "PR的编号", "required": false, "schema": { "type": "string" } }, { - "name": "page", + "name": "workflow_id", "in": "query", - "description": "分页参数,第几页", + "description": "流水线id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "workflow_name", + "in": "query", + "description": "流水线名称", "required": false, "schema": { "type": "string" @@ -39933,11 +43408,38 @@ { "name": "per_page", "in": "query", - "description": "分页参数,每页数量", + "description": "每页的数量,最大为 100,默认 20", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前的页码:默认为 1", "required": false, "schema": { "type": "string" } + }, + { + "name": "startTime", + "in": "query", + "description": "开始时间,格式时间戳", + "required": false, + "schema": { + "type": "number" + } + }, + { + "name": "endTime", + "in": "query", + "description": "结束时间,格式时间戳", + "required": false, + "schema": { + "type": "number" + } } ], "responses": { @@ -39946,269 +43448,698 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "number": { - "type": "integer" - }, - "title": { - "type": "string" - }, - "source_type": { - "type": "string" - }, - "status": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "repo": { + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "总数量" + }, + "workflow_runs": { + "type": "array", + "items": { "type": "object", "properties": { - "id": { - "type": "integer" + "workflow_run_id": { + "type": "string", + "description": "流水线运行id" }, - "full_name": { + "workflow_id": { + "type": "string", + "description": "流水线id" + }, + "workflow_name": { "type": "string" }, - "human_name": { + "file_path": { "type": "string" }, - "url": { + "title": { "type": "string" }, - "name": { + "status": { + "type": "string", + "description": "运行状态,COMPLETED(已完成),RUNNING(运行中),FAILED(失败),CANCELED(取消),IGNORED(忽略),PAUSED(暂停),SUSPEND(挂起)" + }, + "event": { + "type": "string", + "description": "触发事件类型,MR(mr事件),Push(推送事件),Manual(手动触发)" + }, + "run_number": { + "type": "integer" + }, + "head_branch": { "type": "string" + }, + "head_sha": { + "type": "string" + }, + "actor": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "object_id", + "login", + "name" + ], + "description": "触发人" + }, + "start_time": { + "type": "integer", + "description": "开始时间戳" + }, + "end_time": { + "type": "integer", + "description": "结束时间戳" + }, + "pause_time": { + "type": "integer", + "description": "暂停时间" } }, "required": [ - "id", - "full_name", - "human_name", - "url", - "name" + "workflow_run_id", + "workflow_id", + "workflow_name", + "file_path", + "title", + "status", + "event", + "run_number", + "head_branch", + "head_sha", + "actor", + "start_time", + "end_time", + "pause_time" ] }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "color" - ] - } - }, - "assignees": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "required": [ - "id", - "login", - "name", - "avatar_url", - "html_url", - "url" - ] + "description": "流水线运行记录" + } + }, + "required": [ + "total_count", + "workflow_runs" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v8/repos/{owner}/{repo}/actions/runs/{run_id}": { + "get": { + "summary": "获取流水线的运行详情", + "deprecated": false, + "description": "", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_runs_{run_id}", + "tags": [ + "action" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "description": "流水线运行id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "用户授权码", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workflow_run_id": { + "type": "string", + "description": "流水线运行id" + }, + "workflow_id": { + "type": "string", + "description": "流水线id" + }, + "workflow_name": { + "type": "string", + "description": "流水线名称" + }, + "file_path": { + "type": "string" + }, + "title": { + "type": "string" + }, + "status": { + "type": "string", + "description": "运行状态,COMPLETED(已完成),RUNNING(运行中),FAILED(失败),CANCELED(取消),IGNORED(忽略),PAUSED(暂停),SUSPEND(挂起)" + }, + "event": { + "type": "string", + "description": "触发事件类型,MR(mr事件),Push(推送事件),Manual(手动触发)" + }, + "run_number": { + "type": "integer" + }, + "head_branch": { + "type": "string" + }, + "head_sha": { + "type": "string" + }, + "actor": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "type": "string" } }, - "milestone_resp": { + "required": [ + "id", + "object_id", + "login", + "name" + ], + "description": "触发人" + }, + "start_time": { + "type": "integer", + "description": "开始时间戳" + }, + "end_time": { + "type": "integer", + "description": "结束时间戳" + }, + "pause_time": { + "type": "integer" + }, + "exist_in_default_branch": { + "type": "boolean" + }, + "stages": { + "type": "array", + "items": { "type": "object", "properties": { - "html_url": { + "id": { "type": "string" }, - "id": { - "type": "integer" + "category": { + "type": "string" }, - "title": { + "name": { "type": "string" }, - "url": { + "identifier": { "type": "string" - } - }, - "required": [ - "html_url", - "id", - "title", - "url" - ] - }, - "linked_pull_requests": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "type": "string" - }, - "url": { + }, + "run_always": { + "type": "boolean" + }, + "fail_fast": { + "type": "boolean" + }, + "parallel": { + "type": "null" + }, + "is_select": { + "type": "boolean" + }, + "sequence": { + "type": "integer" + }, + "depends_on": { + "type": "array", + "items": { "type": "string" - }, - "repo": { + } + }, + "condition": { + "type": "null" + }, + "status": { + "type": "string" + }, + "start_time": { + "type": "integer" + }, + "end_time": { + "type": "integer" + }, + "pause_time": { + "type": "integer" + }, + "pre": { + "type": "array", + "items": { "type": "object", "properties": { - "id": { + "runtime_attribution": { + "type": "null" + }, + "multi_step_editable": { "type": "integer" }, - "full_name": { + "official_task_version": { + "type": "null" + }, + "icon_url": { + "type": "null" + }, + "name": { + "type": "null" + }, + "task": { "type": "string" }, - "human_name": { + "business_type": { + "type": "null" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "type": "null" + }, + "sequence": { + "type": "null" + }, + "identifier": { + "type": "null" + }, + "endpoint_ids": { + "type": "null" + }, + "id": { "type": "string" }, - "url": { + "job_run_id": { "type": "string" }, - "name": { + "last_dispatch_id": { "type": "string" + }, + "status": { + "type": "string" + }, + "message": { + "type": "null" + }, + "start_time": { + "type": "integer" + }, + "end_time": { + "type": "integer" + }, + "daily_build_number": { + "type": "null" + }, + "timeout-minutes": { + "type": "null" + }, + "continue-on-error": { + "type": "null" } }, "required": [ + "runtime_attribution", + "multi_step_editable", + "official_task_version", + "icon_url", + "name", + "task", + "business_type", + "inputs", + "env", + "sequence", + "identifier", + "endpoint_ids", "id", - "full_name", - "human_name", - "url", - "name" + "job_run_id", + "last_dispatch_id", + "status", + "message", + "start_time", + "end_time", + "daily_build_number", + "timeout-minutes", + "continue-on-error" ] } - } - } - }, - "values": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field_name": { - "type": "string" - }, - "field_type": { + }, + "post": { + "type": "array", + "items": { "type": "string" - }, - "value": { + } + }, + "jobs": { + "type": "array", + "items": { "type": "object", "properties": { - "color": { + "id": { + "type": "string", + "description": "任务id" + }, + "category": { + "type": "null" + }, + "sequence": { + "type": "integer" + }, + "async": { + "type": "null" + }, + "name": { + "type": "string", + "description": "任务名称" + }, + "identifier": { + "type": "string" + }, + "depends_on": { + "type": "array", + "items": { + "type": "string" + } + }, + "condition": { "type": "string" }, - "value": { + "resource": { + "type": "string" + }, + "is_select": { + "type": "boolean" + }, + "timeout": { + "type": "null" + }, + "last_dispatch_id": { "type": "string" }, - "position": { + "execute_cost_time": { "type": "integer" }, - "description": { + "status": { + "type": "string", + "description": "COMPLETED(已完成),RUNNING(运行中),FAILED(失败),CANCELED(取消),IGNORED(忽略),PAUSED(暂停),SUSPEND(挂起)" + }, + "message": { + "type": "null" + }, + "start_time": { + "type": "integer" + }, + "end_time": { + "type": "integer" + }, + "exec_id": { + "type": "string" + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "runtime_attribution": { + "type": "null" + }, + "multi_step_editable": { + "type": "integer" + }, + "official_task_version": { + "type": "null" + }, + "icon_url": { + "type": "null" + }, + "name": { + "type": "string" + }, + "task": { + "type": "string" + }, + "business_type": { + "type": "null" + }, + "inputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "key", + "value" + ] + } + }, + "env": { + "type": "array", + "items": { + "type": "string" + } + }, + "sequence": { + "type": "integer" + }, + "identifier": { + "type": "string" + }, + "endpoint_ids": { + "type": "null" + }, + "id": { + "type": "string" + }, + "job_run_id": { + "type": "string" + }, + "last_dispatch_id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "message": { + "type": "null" + }, + "start_time": { + "type": "integer" + }, + "end_time": { + "type": "integer" + }, + "daily_build_number": { + "type": "null" + }, + "timeout-minutes": { + "type": "null" + }, + "continue-on-error": { + "type": "null" + } + }, + "required": [ + "runtime_attribution", + "multi_step_editable", + "official_task_version", + "icon_url", + "name", + "task", + "business_type", + "inputs", + "env", + "sequence", + "identifier", + "endpoint_ids", + "id", + "job_run_id", + "last_dispatch_id", + "status", + "message", + "start_time", + "end_time", + "daily_build_number", + "timeout-minutes", + "continue-on-error" + ] + } + }, + "job_type": { "type": "string" + }, + "max_parallel": { + "type": "null" + }, + "fail_fast": { + "type": "null" + }, + "from": { + "type": "null" + }, + "with": { + "type": "null" + }, + "secrets": { + "type": "null" + }, + "outputs_define": { + "type": "null" + }, + "concurrency": { + "type": "null" + }, + "timeout_minutes": { + "type": "null" + }, + "continue_on_error": { + "type": "null" } }, "required": [ - "color", - "value", - "position" + "id", + "category", + "sequence", + "async", + "name", + "identifier", + "depends_on", + "condition", + "resource", + "is_select", + "timeout", + "last_dispatch_id", + "execute_cost_time", + "status", + "message", + "start_time", + "end_time", + "exec_id", + "steps", + "job_type", + "max_parallel", + "fail_fast", + "from", + "with", + "secrets", + "outputs_define", + "concurrency", + "timeout_minutes", + "continue_on_error" ] - } - }, - "required": [ - "field_name", - "field_type", - "value" - ] - } - }, - "reviewers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" }, - "url": { - "type": "string" - } + "description": "流水线运行任务信息" } - } + }, + "required": [ + "id", + "category", + "name", + "identifier", + "run_always", + "fail_fast", + "parallel", + "is_select", + "sequence", + "depends_on", + "condition", + "status", + "start_time", + "end_time", + "pause_time", + "pre", + "post", + "jobs" + ], + "description": "流水线运行阶段信息" } - }, - "required": [ - "id", - "number", - "title", - "source_type", - "status", - "html_url", - "url", - "repo", - "labels", - "values", - "assignees" - ] - } + } + }, + "required": [ + "workflow_run_id", + "workflow_id", + "workflow_name", + "file_path", + "title", + "status", + "event", + "run_number", + "head_branch", + "head_sha", + "actor", + "start_time", + "end_time", + "pause_time", + "exist_in_default_branch", + "stages" + ] } } }, @@ -40218,32 +44149,39 @@ "security": [] } }, - "/api/v5/org/{owner}/kanban/{kanban_id}/state": { - "put": { - "summary": "修改看板状态", + "/api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + "get": { + "summary": "获取工作流运行的jobs列表", "deprecated": false, "description": "", - "operationId": "put_api_v5_org_{owner}_kanban_{kanban_id}_state", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_runs_{run_id}_jobs", "tags": [ - "KanBan" + "action" ], "parameters": [ { "name": "owner", "in": "path", - "description": "组织的路径", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "kanban_id", + "name": "repo", "in": "path", - "description": "看板id", + "description": "仓库路径(path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "description": "流水线运行id", "required": true, - "example": "", "schema": { "type": "string" } @@ -40253,31 +44191,11 @@ "in": "query", "description": "用户授权码", "required": false, - "example": "", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "state": { - "type": "string", - "description": "看板状态,关闭:closed;开启:open" - } - }, - "required": [ - "state" - ] - }, - "example": "" - } - } - }, "responses": { "200": { "description": "", @@ -40285,7 +44203,257 @@ "application/json": { "schema": { "type": "object", - "properties": {} + "properties": { + "total_count": { + "type": "integer" + }, + "jobs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "category": { + "type": "null" + }, + "sequence": { + "type": "integer" + }, + "async": { + "type": "null" + }, + "name": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "depends_on": { + "type": "array", + "items": { + "type": "string" + } + }, + "condition": { + "type": "string" + }, + "resource": { + "type": "string" + }, + "is_select": { + "type": "boolean" + }, + "timeout": { + "type": "null" + }, + "last_dispatch_id": { + "type": "string" + }, + "execute_cost_time": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "message": { + "type": "null" + }, + "start_time": { + "type": "integer" + }, + "end_time": { + "type": "integer" + }, + "exec_id": { + "type": "string" + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "runtime_attribution": { + "type": "null" + }, + "multi_step_editable": { + "type": "integer" + }, + "official_task_version": { + "type": "null" + }, + "icon_url": { + "type": "null" + }, + "name": { + "type": "string" + }, + "task": { + "type": "string" + }, + "business_type": { + "type": "null" + }, + "inputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "key", + "value" + ] + } + }, + "env": { + "type": "array", + "items": { + "type": "string" + } + }, + "sequence": { + "type": "integer" + }, + "identifier": { + "type": "string" + }, + "endpoint_ids": { + "type": "null" + }, + "id": { + "type": "string" + }, + "job_run_id": { + "type": "string" + }, + "last_dispatch_id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "message": { + "type": "null" + }, + "start_time": { + "type": "integer" + }, + "end_time": { + "type": "integer" + }, + "daily_build_number": { + "type": "null" + }, + "timeout-minutes": { + "type": "null" + }, + "continue-on-error": { + "type": "null" + } + }, + "required": [ + "runtime_attribution", + "multi_step_editable", + "official_task_version", + "icon_url", + "name", + "task", + "business_type", + "inputs", + "env", + "sequence", + "identifier", + "endpoint_ids", + "id", + "job_run_id", + "last_dispatch_id", + "status", + "message", + "start_time", + "end_time", + "daily_build_number", + "timeout-minutes", + "continue-on-error" + ] + } + }, + "job_type": { + "type": "string" + }, + "max_parallel": { + "type": "null" + }, + "fail_fast": { + "type": "null" + }, + "from": { + "type": "null" + }, + "with": { + "type": "null" + }, + "secrets": { + "type": "null" + }, + "outputs_define": { + "type": "null" + }, + "concurrency": { + "type": "null" + }, + "timeout_minutes": { + "type": "null" + }, + "continue_on_error": { + "type": "null" + } + }, + "required": [ + "id", + "category", + "sequence", + "async", + "name", + "identifier", + "depends_on", + "condition", + "resource", + "is_select", + "timeout", + "last_dispatch_id", + "execute_cost_time", + "status", + "message", + "start_time", + "end_time", + "exec_id", + "steps", + "job_type", + "max_parallel", + "fail_fast", + "from", + "with", + "secrets", + "outputs_define", + "concurrency", + "timeout_minutes", + "continue_on_error" + ] + } + } + }, + "required": [ + "total_count", + "jobs" + ] } } }, @@ -40295,33 +44463,48 @@ "security": [] } }, - "/api/v8/enterprises/{enterprise}/members/{username}": { + "/api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/jobs/{job_id}": { "get": { - "summary": "获取企业的一个成员", + "summary": "获取工作流运行的job详情", "deprecated": false, "description": "", - "operationId": "get_api_v8_enterprises_{enterprise}_members_{username}", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_runs_{run_id}_jobs_{job_id}", "tags": [ - "Enterprise", - "Organizations" + "action" ], "parameters": [ { - "name": "enterprise", + "name": "owner", "in": "path", - "description": "企业id", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, - "example": 0, "schema": { - "type": "integer" + "type": "string" } }, { - "name": "username", + "name": "repo", "in": "path", - "description": "用户名(username/login)", + "description": "仓库路径(path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "description": "流水线运行id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "job_id", + "in": "path", + "description": "任务id", "required": true, - "example": "", "schema": { "type": "string" } @@ -40330,7 +44513,8 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, + "example": "", "schema": { "type": "string" } @@ -40338,78 +44522,249 @@ ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "user": { - "type": "object", - "properties": { - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "object_id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "user_id": { - "type": "string" - } - }, - "required": [ - "avatar_url", - "html_url", - "id", - "object_id", - "login", - "name", - "url", - "user_id" - ] + "id": { + "type": "string", + "description": "任务id" }, - "active": { - "type": "boolean" + "category": { + "type": "null" }, - "role": { + "sequence": { + "type": "integer" + }, + "async": { + "type": "null" + }, + "name": { + "type": "string", + "description": "任务名称" + }, + "identifier": { "type": "string" }, - "role_name": { + "depends_on": { + "type": "array", + "items": { + "type": "string" + } + }, + "condition": { "type": "string" }, - "role_id": { + "resource": { "type": "string" }, - "role_name_cn": { + "is_select": { + "type": "boolean" + }, + "timeout": { + "type": "null" + }, + "last_dispatch_id": { "type": "string" }, - "enterprise_email": { + "execute_cost_time": { + "type": "integer" + }, + "status": { + "type": "string", + "description": "任务状态。COMPLETED(已完成),RUNNING(运行中),FAILED(失败),CANCELED(取消),IGNORED(忽略),PAUSED(暂停),SUSPEND(挂起)" + }, + "message": { + "type": "null" + }, + "start_time": { + "type": "integer" + }, + "end_time": { + "type": "integer" + }, + "exec_id": { + "type": "string" + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "runtime_attribution": { + "type": "null" + }, + "multi_step_editable": { + "type": "integer" + }, + "official_task_version": { + "type": "null" + }, + "icon_url": { + "type": "null" + }, + "name": { + "type": "string" + }, + "task": { + "type": "string" + }, + "business_type": { + "type": "null" + }, + "inputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "key", + "value" + ] + } + }, + "env": { + "type": "array", + "items": { + "type": "string" + } + }, + "sequence": { + "type": "integer" + }, + "identifier": { + "type": "string" + }, + "endpoint_ids": { + "type": "null" + }, + "id": { + "type": "string" + }, + "job_run_id": { + "type": "string" + }, + "last_dispatch_id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "message": { + "type": "null" + }, + "start_time": { + "type": "integer" + }, + "end_time": { + "type": "integer" + }, + "daily_build_number": { + "type": "null" + }, + "timeout-minutes": { + "type": "null" + }, + "continue-on-error": { + "type": "null" + } + }, + "required": [ + "runtime_attribution", + "multi_step_editable", + "official_task_version", + "icon_url", + "name", + "task", + "business_type", + "inputs", + "env", + "sequence", + "identifier", + "endpoint_ids", + "id", + "job_run_id", + "last_dispatch_id", + "status", + "message", + "start_time", + "end_time", + "daily_build_number", + "timeout-minutes", + "continue-on-error" + ] + } + }, + "job_type": { "type": "string" + }, + "max_parallel": { + "type": "null" + }, + "fail_fast": { + "type": "null" + }, + "from": { + "type": "null" + }, + "with": { + "type": "null" + }, + "secrets": { + "type": "null" + }, + "outputs_define": { + "type": "null" + }, + "concurrency": { + "type": "null" + }, + "timeout_minutes": { + "type": "null" + }, + "continue_on_error": { + "type": "null" } }, "required": [ - "user", - "active", - "role", - "role_name", - "role_id", - "role_name_cn", - "enterprise_email" + "id", + "category", + "sequence", + "async", + "name", + "identifier", + "depends_on", + "condition", + "resource", + "is_select", + "timeout", + "last_dispatch_id", + "execute_cost_time", + "status", + "message", + "start_time", + "end_time", + "exec_id", + "steps", + "job_type", + "max_parallel", + "fail_fast", + "from", + "with", + "secrets", + "outputs_define", + "concurrency", + "timeout_minutes", + "continue_on_error" ] } } @@ -40418,33 +44773,50 @@ } }, "security": [] - }, - "delete": { - "summary": "删除企业成员", + } + }, + "/api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/jobs/{job_id}/download_log": { + "get": { + "summary": "下载工作流运行的job日志", "deprecated": false, "description": "", - "operationId": "delete_api_v8_enterprises_{enterprise}_members_{usernames}", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_runs_{run_id}_jobs_{job_id}_download_log", "tags": [ - "Enterprise", - "Organizations" + "action" ], "parameters": [ { - "name": "enterprise", + "name": "owner", "in": "path", - "description": "企业id", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "description": "流水线运行id", "required": true, - "example": 0, "schema": { - "type": "integer" + "type": "string" } }, { - "name": "username", + "name": "job_id", "in": "path", - "description": "", + "description": "任务id", "required": true, - "example": "", "schema": { "type": "string" } @@ -40454,6 +44826,7 @@ "in": "query", "description": "用户授权码", "required": true, + "example": "", "schema": { "type": "string" } @@ -40461,25 +44834,12 @@ ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { - "application/json": { + "application/octet-stream": { "schema": { "type": "object", "properties": {} - }, - "example": { - "user": { - "avatar_url": "https://cdn-img.gitcode.com/ec/fb/430ecf07b9ee91bbbbf341d92a36783d06e69086f82ce8cf5a6406f79f1c9cf4.png", - "html_url": "https://gitcode.com/dengmengmian", - "id": "268", - "login": "dengmengmian", - "name": "麻凡", - "url": "https://api.gitcode.com/api/v5/dengmengmian" - }, - "url": "https://api.gitcode.com/api/v5/enterprises/go-tribe/members/dengmengmian", - "active": true, - "role": "admin" } } }, @@ -40487,33 +44847,32 @@ } }, "security": [] - }, - "put": { - "summary": "修改企业成员权限", + } + }, + "/api/v8/repos/{owner}/{repo}/actions/artifacts": { + "get": { + "summary": "列出仓库的 Artifacts", "deprecated": false, - "description": "", - "operationId": "put_api_v8_enterprises_{enterprise}_members_{username}", + "description": "分页查询仓库下的制品,支持按名称过滤及排序。", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_artifacts", "tags": [ - "Enterprise", - "Organizations" + "action" ], "parameters": [ { - "name": "enterprise", + "name": "owner", "in": "path", - "description": "企业id", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, - "example": 0, "schema": { - "type": "integer" + "type": "string" } }, { - "name": "username", + "name": "repo", "in": "path", - "description": "用户名(username/login)", + "description": "仓库路径(path)", "required": true, - "example": "", "schema": { "type": "string" } @@ -40522,88 +44881,118 @@ "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "role": { - "type": "string", - "description": "企业角色(viewer:浏览者、tester:测试人、developer:研发、maintainer:维护者、admin:管理员、customized:自定义角色)" - }, - "role_id": { - "type": "string", - "description": "角色ID, 如果role传入了customized则需要传入角色id" - } - }, - "required": [ - "role" - ] - }, - "example": "" + }, + { + "name": "name", + "in": "query", + "description": "制品名称过滤(模糊匹配)", + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "排序字段,当前仅支持created", + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "direction", + "in": "query", + "description": "排序方向,asc 或 desc", + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "required": false, + "example": 1, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的项目数", + "example": 10, + "schema": { + "type": "integer" } } - }, + ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "active": { - "type": "integer" - }, - "role": { - "type": "string" - }, - "url": { - "type": "string" + "total_count": { + "type": "integer", + "description": "制品总数" }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "login": { - "type": "string" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" + "artifacts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "制品ID" + }, + "name": { + "type": "string", + "description": "制品名称" + }, + "size_bytes": { + "type": "integer", + "description": "制品大小(字节)" + }, + "workflow_id": { + "type": "string", + "description": "工作流ID" + }, + "workflow_run_id": { + "type": "string", + "description": "工作流运行ID" + }, + "digest": { + "type": "string", + "description": "SHA256 摘要" + }, + "expires_at": { + "type": "string", + "description": "过期时间(毫秒时间戳)" + }, + "created_at": { + "type": "string", + "description": "创建时间(毫秒时间戳)" + }, + "updated_at": { + "type": "string", + "description": "更新时间(毫秒时间戳)" + } }, - "name": { - "type": "string", - "description": "名称" - } + "description": "制品列表" }, - "required": [ - "name" - ] + "description": "制品列表" } - } - }, - "example": { - "active": true, - "role": "member", - "url": "https://api.gitcode.com/api/v5/enterprises/litestabc/members/malongge5", - "user": { - "id": 953, - "login": "malongge5", - "url": "https://api.gitcode.com/api/v5/malongge5", - "html_url": "https://gitcode.com/malongge5" - } + }, + "description": "com.gitcode.openapi.pojo.artifact.BizArtifactListResp" } } }, @@ -40613,141 +45002,158 @@ "security": [] } }, - "/api/v8/enterprises/{enterprise}/members": { + "/api/v8/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { "get": { - "summary": "列出企业的所有成员", + "summary": "列出特定 Run 的 Artifacts", "deprecated": false, - "description": "", - "operationId": "get_api_v8_enterprises_{enterprise}_members", + "description": "分页查询指定 Workflow Run 产生的所有制品,支持按创建时间排序。", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_runs_{run_id}_artifacts", "tags": [ - "Enterprise", - "Organizations" + "action" ], "parameters": [ { - "name": "enterprise", + "name": "owner", "in": "path", - "description": "企业id", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, - "example": 0, "schema": { - "type": "integer" + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "description": "流水线运行id", + "required": true, + "schema": { + "type": "string" } }, { "name": "access_token", "in": "query", "description": "用户授权码", - "required": true, + "required": false, "schema": { "type": "string" } }, { - "name": "page", + "name": "name", "in": "query", - "description": "当前的页码:默认为 1", - "required": false, + "description": "制品名称过滤(模糊匹配)", + "example": "", "schema": { - "type": "integer" + "type": "string" } }, { - "name": "per_page", + "name": "sort", "in": "query", - "description": "每页的数量,最大为 100,默认 20", - "required": false, + "description": "排序字段,当前仅支持created", + "example": "", "schema": { - "type": "integer" + "type": "string" } }, { - "name": "role", + "name": "direction", "in": "query", - "description": "根据角色筛选成员(all/admin/member)", - "required": false, + "description": "排序方向,asc 或 desc", + "example": "", "schema": { "type": "string" } + }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "example": 1, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的项目数", + "example": 10, + "schema": { + "type": "integer" + } } ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "user": { + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "制品总数" + }, + "artifacts": { + "type": "array", + "items": { "type": "object", "properties": { - "html_url": { - "type": "string" - }, "id": { - "type": "string" + "type": "string", + "description": "制品ID" }, - "object_id": { - "type": "string" + "name": { + "type": "string", + "description": "制品名称" }, - "login": { - "type": "string" + "size_bytes": { + "type": "integer", + "description": "制品大小(字节)" }, - "name": { - "type": "string" + "workflow_id": { + "type": "string", + "description": "工作流ID" }, - "url": { - "type": "string" + "workflow_run_id": { + "type": "string", + "description": "工作流运行ID" }, - "user_id": { - "type": "string" + "digest": { + "type": "string", + "description": "SHA256 摘要" }, - "avatar_url": { - "type": "string" + "expires_at": { + "type": "string", + "description": "过期时间(毫秒时间戳)" + }, + "created_at": { + "type": "string", + "description": "创建时间(毫秒时间戳)" + }, + "updated_at": { + "type": "string", + "description": "更新时间(毫秒时间戳)" } }, - "required": [ - "avatar_url", - "html_url", - "id", - "object_id", - "login", - "name", - "url", - "user_id" - ] - }, - "active": { - "type": "boolean" - }, - "role": { - "type": "string" + "description": "制品列表" }, - "role_name": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "role_name_cn": { - "type": "string" - }, - "enterprise_email": { - "type": "string" - } - }, - "required": [ - "user", - "active", - "role", - "role_name", - "role_id", - "role_name_cn" - ] - } + "description": "制品列表" + } + }, + "description": "com.gitcode.openapi.pojo.artifact.BizArtifactListResp" } } }, @@ -40757,33 +45163,39 @@ "security": [] } }, - "/api/v8/enterprises/{enterprise}/memberships/{username}": { - "post": { - "summary": "邀请企业成员", + "/api/v8/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + "get": { + "summary": "获取 Artifact 详情", "deprecated": false, - "description": "", - "operationId": "post_api_v8_enterprises_{enterprise}_memberships_{username}", + "description": "查询仓库下指定制品的详情。", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_artifacts_{artifact_id}", "tags": [ - "Enterprise", - "Organizations" + "action" ], "parameters": [ { - "name": "enterprise", + "name": "owner", "in": "path", - "description": "企业id", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, - "example": 0, "schema": { - "type": "integer" + "type": "string" } }, { - "name": "username", + "name": "repo", "in": "path", - "description": "用户名(username/login)", + "description": "仓库路径(path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "artifact_id", + "in": "path", + "description": "制品id", "required": true, - "example": "", "schema": { "type": "string" } @@ -40791,95 +45203,59 @@ { "name": "access_token", "in": "query", - "description": "用户授权码", - "required": true, + "description": "", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "permission": { - "type": "string", - "description": "成员权限: 拉代码(pull),推代码(push),维护者(admin),customized(自定义角色)。默认: push" - }, - "role_id": { - "type": "string", - "description": "角色ID, 如果permission传入了customized则需要传入角色id" - } - } - }, - "example": "" - } - } - }, "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "followers_url": { - "type": "string" + "id": { + "type": "string", + "description": "制品ID" }, - "html_url": { - "type": "string" + "name": { + "type": "string", + "description": "制品名称" }, - "id": { - "type": "string" + "size_bytes": { + "type": "integer", + "description": "制品大小(字节)" }, - "login": { - "type": "string" + "workflow_id": { + "type": "string", + "description": "工作流ID" }, - "name": { - "type": "string" + "workflow_run_id": { + "type": "string", + "description": "工作流运行ID" }, - "type": { - "type": "string" + "digest": { + "type": "string", + "description": "SHA256 摘要" }, - "url": { - "type": "string" + "expires_at": { + "type": "string", + "description": "过期时间(毫秒时间戳)" }, - "permissions": { - "type": "object", - "properties": { - "admin": { - "type": "integer" - }, - "customized": { - "type": "integer" - }, - "push": { - "type": "integer" - }, - "pull": { - "type": "integer" - } - } + "created_at": { + "type": "string", + "description": "创建时间(毫秒时间戳)" + }, + "updated_at": { + "type": "string", + "description": "更新时间(毫秒时间戳)" } - } - }, - "example": { - "followers_url": "https://api.gitcode.com/api/v5/users/xiaogang2/followers", - "html_url": "https://gitcode.com/xiaogang2", - "id": "65ffca965079ba0d1c00f6f2", - "login": "xiaogang2", - "name": "肖刚2", - "type": "User", - "url": "https://api.gitcode.com/api/v5/xiaogang2", - "permissions": { - "admin": false, - "customized": true, - "push": true, - "pull": true - } + }, + "description": "com.gitcode.openapi.pojo.artifact.BizArtifactItemResp" } } }, @@ -40887,24 +45263,104 @@ } }, "security": [] + }, + "delete": { + "summary": "删除指定 Artifact", + "deprecated": false, + "description": "删除仓库下指定制品。", + "operationId": "delete_api_v8_repos_{owner}_{repo}_actions_artifacts_{artifact_id}", + "tags": [ + "action" + ], + "parameters": [ + { + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "artifact_id", + "in": "path", + "description": "制品id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "", + "headers": {} + } + }, + "security": [] } }, - "/api/v8/org/{org}/enterprise": { + "/api/v8/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { "get": { - "summary": "获取组织关联的企业", + "summary": "下载指定 Artifact", "deprecated": false, - "description": "", - "operationId": "get_api_v8_org_{org}_enterprise", + "description": "获取制品 zip 下载地址并返回 302 跳转。", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_artifacts_{artifact_id}_{archive_format}", "tags": [ - "Enterprise" + "action" ], "parameters": [ { - "name": "org", + "name": "owner", + "in": "path", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "artifact_id", + "in": "path", + "description": "制品id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "archive_format", "in": "path", - "description": "组织的路径", + "description": "仅支持zip", "required": true, - "example": "", "schema": { "type": "string" } @@ -40912,7 +45368,7 @@ { "name": "access_token", "in": "query", - "description": "用户授权码", + "description": "", "required": false, "schema": { "type": "string" @@ -40920,35 +45376,14 @@ } ], "responses": { - "200": { - "description": "成功响应", + "302": { + "description": "", "content": { "application/json": { "schema": { "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ] - }, - "example": { - "active": true, - "role": "member", - "url": "https://api.gitcode.com/api/v5/enterprises/litestabc/members/malongge5", - "user": { - "id": 953, - "login": "malongge5", - "url": "https://api.gitcode.com/api/v5/malongge5", - "html_url": "https://gitcode.com/malongge5" - } + "properties": {}, + "description": "java.lang.Void" } } }, @@ -40958,22 +45393,30 @@ "security": [] } }, - "/api/v8/enterprise/{enterprise_id}/customized_roles": { + "/api/v8/repos/{owner}/{repo}/actions/runners": { "get": { - "summary": "获取企业自定义角色", + "summary": "查询指定仓库下的所有主机 Runner", "deprecated": false, "description": "", - "operationId": "get_api_v8_enterprise_{enterprise_id}_customized_roles", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_runners", "tags": [ - "Enterprise" + "action" ], "parameters": [ { - "name": "enterprise_id", + "name": "owner", "in": "path", - "description": "企业id", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", "required": true, - "example": "", "schema": { "type": "string" } @@ -40981,58 +45424,126 @@ { "name": "access_token", "in": "query", - "description": "用户授权码", - "required": false, + "description": "", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "keyword", + "in": "query", + "description": "关键字过滤", + "example": "", "schema": { "type": "string" } + }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "example": 1, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的项目数", + "example": 10, + "schema": { + "type": "integer" + } } ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "name_cn": { - "type": "string" - }, - "product_id": { - "type": "string" - }, - "access_level": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "role_type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mgnt_mode": { - "type": "integer" + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "Runner 总数" + }, + "runners": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Runner ID" + }, + "runner_group_id": { + "type": "string", + "description": "Runner Group ID" + }, + "runner_name": { + "type": "string", + "description": "Runner 名称" + }, + "name": { + "type": "string", + "description": "名称" + }, + "work_dir": { + "type": "string", + "description": "工作目录" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label_name": { + "type": "string", + "description": "标签名称" + }, + "label_value": { + "type": "string", + "description": "标签值" + }, + "label_color": { + "type": "string", + "description": "标签颜色" + } + }, + "description": "标签列表" + }, + "description": "标签列表" + }, + "status": { + "type": "string", + "description": "状态,\"IDLE\", \"BUSY\", \"OFFLINE\", \"DISABLE\"" + }, + "create_time": { + "type": "integer", + "description": "创建时间" + }, + "update_time": { + "type": "integer", + "description": "更新时间" + }, + "memory": { + "type": "number", + "description": "内存使用率(%)" + }, + "disk": { + "type": "number", + "description": "可用硬盘(GB)" + } + }, + "description": "Runner 列表" }, - "member_count": { - "type": "integer" - } + "description": "Runner 列表" } - } + }, + "description": "com.gitcode.openapi.pojo.action.runner.BizActionRunnerListResp" } } }, @@ -41042,22 +45553,30 @@ "security": [] } }, - "/api/v8/enterprises/{enterprise}/milestones": { - "post": { - "summary": "创建企业里程碑", + "/api/v8/repos/{owner}/{repo}/actions/runners/shared-runners": { + "get": { + "summary": "查询分享给仓库的所有主机 Runner", "deprecated": false, "description": "", - "operationId": "post_api_v8_enterprise_{enterprise_id}_milestones", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_runners_shared_runners", "tags": [ - "Enterprise" + "action" ], "parameters": [ { - "name": "enterprise", + "name": "owner", "in": "path", - "description": "企业id", + "description": "仓库所属空间地址(组织或个人的地址path)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "仓库路径(path)", "required": true, - "example": "", "schema": { "type": "string" } @@ -41065,109 +45584,126 @@ { "name": "access_token", "in": "query", - "description": "用户授权码", + "description": "", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "名称" - }, - "description": { - "type": "string", - "description": "描述" - }, - "start_date": { - "type": "string", - "description": "开始时间, 格式%Y-%m-%d" - }, - "due_date": { - "type": "string", - "description": "截止时间, 格式%Y-%m-%d" - }, - "projects": { - "type": "array", - "items": { - "type": "integer", - "description": "项目id" - }, - "description": "关联的项目" - } - }, - "required": [ - "title" - ] - }, - "example": "" + }, + { + "name": "keyword", + "in": "query", + "description": "关键字过滤", + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "example": 1, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的项目数", + "example": 10, + "schema": { + "type": "integer" } } - }, + ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { + "total_count": { "type": "integer", - "title": "id" - }, - "title": { - "type": "string", - "title": "标题" + "description": "Runner 总数" }, - "description": { - "type": "string", - "title": "描述" - }, - "state": { - "type": "string", - "title": "状态" - }, - "created_at": { - "type": "string", - "title": "创建时间" - }, - "updated_at": { - "type": "string", - "title": "更新时间" - }, - "due_date": { - "type": "string", - "title": "截止时间" - }, - "start_date": { - "type": "string", - "title": "开始时间" - }, - "projects": { + "runners": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Runner ID" + }, + "runner_group_id": { + "type": "string", + "description": "Runner Group ID" + }, + "runner_name": { + "type": "string", + "description": "Runner 名称" + }, + "name": { + "type": "string", + "description": "名称" + }, + "work_dir": { + "type": "string", + "description": "工作目录" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label_name": { + "type": "string", + "description": "标签名称" + }, + "label_value": { + "type": "string", + "description": "标签值" + }, + "label_color": { + "type": "string", + "description": "标签颜色" + } + }, + "description": "标签列表" + }, + "description": "标签列表" + }, + "status": { + "type": "string", + "description": "状态,\"IDLE\", \"BUSY\", \"OFFLINE\", \"DISABLE\"" + }, + "create_time": { + "type": "integer", + "description": "创建时间" + }, + "update_time": { + "type": "integer", + "description": "更新时间" + }, + "memory": { + "type": "number", + "description": "内存使用率(%)" + }, + "disk": { + "type": "number", + "description": "可用硬盘(GB)" + } + }, + "description": "Runner 列表" }, - "title": "关联的项目列表" + "description": "Runner 列表" } }, - "required": [ - "id", - "title", - "description", - "state", - "created_at", - "updated_at", - "projects" - ] + "description": "com.gitcode.openapi.pojo.action.runner.BizActionRunnerListResp" } } }, @@ -41175,244 +45711,228 @@ } }, "security": [] - }, + } + }, + "/api/v8/repos/{owner}/{repo}/actions/runner-sets": { "get": { - "summary": "获取企业里程碑列表", + "summary": "查询指定仓库下的所有 K8S Runner", "deprecated": false, "description": "", - "operationId": "get_api_v8_enterprise_{enterprise_id}_milestones", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_runner_sets", "tags": [ - "Enterprise" + "action" ], "parameters": [ { - "name": "enterprise", + "name": "owner", "in": "path", - "description": "企业id", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "access_token", - "in": "query", - "description": "用户授权码", + "name": "repo", + "in": "path", + "description": "仓库路径(path)", "required": true, "schema": { "type": "string" } }, { - "name": "name", + "name": "access_token", "in": "query", - "description": "名称", - "required": false, + "description": "", + "required": true, "schema": { "type": "string" } }, { - "name": "state", + "name": "keyword", "in": "query", - "description": "状态", - "required": false, + "description": "关键字过滤", "example": "", "schema": { "type": "string" } }, - { - "name": "order_by", - "in": "query", - "description": "排序字段。可选:updated_at", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "排序方式。降序:desc;升序:asc", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "page", "in": "query", - "description": "当前的页码:默认为 1", - "required": false, + "description": "当前页码", + "example": 1, "schema": { - "type": "string" + "type": "integer" } }, { "name": "per_page", "in": "query", - "description": "每页的数量,最大为 100,默认 20", - "required": false, + "description": "每页的项目数", + "example": 10, "schema": { - "type": "string" + "type": "integer" } } ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "title": "id" - }, - "title": { - "type": "string", - "title": "标题" - }, - "description": { - "type": "string", - "title": "描述" - }, - "state": { - "type": "string", - "title": "状态" - }, - "created_at": { - "type": "string", - "title": "创建时间" - }, - "updated_at": { - "type": "string", - "title": "更新时间" - }, - "due_date": { - "type": "string", - "title": "截止时间" - }, - "start_date": { - "type": "string", - "title": "开始时间" - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "title": "项目id" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string", - "title": "项目名称" - }, - "name_with_namespace": { - "type": "string" - }, - "path": { - "type": "string", - "title": "项目路径" - }, - "path_with_namespace": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "RunnerSet 总数" + }, + "runner_sets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "RunnerSet ID" + }, + "runner_group_id": { + "type": "string", + "description": "Runner Group ID" + }, + "name": { + "type": "string", + "description": "名称" + }, + "status": { + "type": "string", + "description": "状态,using 使用中 wait_release 释放中" + }, + "required_labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label_name": { + "type": "string", + "description": "标签名称" + }, + "label_value": { + "type": "string", + "description": "标签值" + }, + "label_color": { + "type": "string", + "description": "标签颜色" + } + }, + "description": "必需标签" }, - "archived": { - "type": "boolean" - } + "description": "必需标签" + }, + "min_runner_size": { + "type": "integer", + "description": "最小 Runner 数量" + }, + "max_runner_size": { + "type": "integer", + "description": "最大 Runner 数量" + }, + "limit_cpu": { + "type": "integer", + "description": "CPU 限制" + }, + "limit_memory": { + "type": "integer", + "description": "内存限制" + }, + "image_name": { + "type": "string", + "description": "镜像名称" + }, + "user_k8s_cluster_id": { + "type": "string", + "description": "用户 K8S 集群 ID" + }, + "user_k8s_cluster_name": { + "type": "string", + "description": "用户 K8S 集群名称" + }, + "user_k8s_resource_type": { + "type": "string", + "description": "用户 K8S 资源类型" + }, + "user_k8s_cluster_namespace": { + "type": "string", + "description": "用户 K8S 命名空间" + }, + "user_k8s_url": { + "type": "string", + "description": "用户 K8S 地址" + }, + "create_time": { + "type": "integer", + "description": "创建时间" + }, + "update_time": { + "type": "integer", + "description": "更新时间" + }, + "user_id": { + "type": "string", + "description": "用户 ID" }, - "required": [ - "id", - "description", - "name", - "name_with_namespace", - "path", - "path_with_namespace", - "created_at", - "updated_at", - "archived" - ] + "user_name": { + "type": "string", + "description": "用户名" + }, + "user_project_id": { + "type": "string", + "description": "用户项目 ID" + } }, - "title": "关联的项目列表" - } - }, - "required": [ - "id", - "title", - "state", - "created_at", - "updated_at", - "description", - "projects" - ] - } + "description": "RunnerSet 列表" + }, + "description": "RunnerSet 列表" + } + }, + "description": "com.gitcode.openapi.pojo.action.runner.BizK8sRunnerSetListResp" } } }, - "headers": { - "total_count": { - "required": false, - "description": "总数量", - "schema": { - "type": "string" - } - }, - "total_page": { - "required": false, - "description": "总页数", - "schema": { - "type": "string" - } - } - } + "headers": {} } }, "security": [] } }, - "/api/v8/enterprises/{enterprise}/milestones/{milestone_id}": { - "put": { - "summary": "修改企业里程碑", + "/api/v8/repos/{owner}/{repo}/actions/shared-runner-sets": { + "get": { + "summary": "查询分享给仓库的所有 K8S Runner", "deprecated": false, "description": "", - "operationId": "put_api_v8_enterprise_{enterprise_id}_milestones_{milestone_id}", + "operationId": "get_api_v8_repos_{owner}_{repo}_actions_shared_runner_sets", "tags": [ - "Enterprise" + "action" ], "parameters": [ { - "name": "enterprise", + "name": "owner", "in": "path", - "description": "企业id", + "description": "仓库所属空间地址(组织或个人的地址path)", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "milestone_id", + "name": "repo", "in": "path", - "description": "里程碑id", + "description": "仓库路径(path)", "required": true, - "example": "", "schema": { "type": "string" } @@ -41420,113 +45940,162 @@ { "name": "access_token", "in": "query", - "description": "用户授权码", + "description": "", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "名称" - }, - "description": { - "type": "string", - "description": "描述" - }, - "start_date": { - "type": "string", - "description": "开始时间, 格式%Y-%m-%d" - }, - "due_date": { - "type": "string", - "description": "截止时间, 格式%Y-%m-%d" - }, - "state_event": { - "type": "string", - "description": "里程碑状态。开启:active;关闭:closed" - }, - "projects": { - "type": "array", - "items": { - "type": "integer", - "description": "项目id" - }, - "description": "关联的项目" - } - }, - "required": [ - "title" - ] - }, - "example": "" + }, + { + "name": "keyword", + "in": "query", + "description": "关键字过滤", + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "example": 1, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的项目数", + "example": 10, + "schema": { + "type": "integer" } } - }, + ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { + "total_count": { "type": "integer", - "title": "id" - }, - "title": { - "type": "string", - "title": "标题" - }, - "description": { - "type": "string", - "title": "描述" - }, - "state": { - "type": "string", - "title": "状态" - }, - "created_at": { - "type": "string", - "title": "创建时间" - }, - "updated_at": { - "type": "string", - "title": "更新时间" - }, - "due_date": { - "type": "string", - "title": "截止时间" - }, - "start_date": { - "type": "string", - "title": "开始时间" + "description": "RunnerSet 总数" }, - "projects": { + "runner_sets": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "RunnerSet ID" + }, + "runner_group_id": { + "type": "string", + "description": "Runner Group ID" + }, + "name": { + "type": "string", + "description": "名称" + }, + "status": { + "type": "string", + "description": "状态,using 使用中 wait_release 释放中" + }, + "required_labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label_name": { + "type": "string", + "description": "标签名称" + }, + "label_value": { + "type": "string", + "description": "标签值" + }, + "label_color": { + "type": "string", + "description": "标签颜色" + } + }, + "description": "必需标签" + }, + "description": "必需标签" + }, + "min_runner_size": { + "type": "integer", + "description": "最小 Runner 数量" + }, + "max_runner_size": { + "type": "integer", + "description": "最大 Runner 数量" + }, + "limit_cpu": { + "type": "integer", + "description": "CPU 限制" + }, + "limit_memory": { + "type": "integer", + "description": "内存限制" + }, + "image_name": { + "type": "string", + "description": "镜像名称" + }, + "user_k8s_cluster_id": { + "type": "string", + "description": "用户 K8S 集群 ID" + }, + "user_k8s_cluster_name": { + "type": "string", + "description": "用户 K8S 集群名称" + }, + "user_k8s_resource_type": { + "type": "string", + "description": "用户 K8S 资源类型" + }, + "user_k8s_cluster_namespace": { + "type": "string", + "description": "用户 K8S 命名空间" + }, + "user_k8s_url": { + "type": "string", + "description": "用户 K8S 地址" + }, + "create_time": { + "type": "integer", + "description": "创建时间" + }, + "update_time": { + "type": "integer", + "description": "更新时间" + }, + "user_id": { + "type": "string", + "description": "用户 ID" + }, + "user_name": { + "type": "string", + "description": "用户名" + }, + "user_project_id": { + "type": "string", + "description": "用户项目 ID" + } + }, + "description": "RunnerSet 列表" }, - "title": "关联的项目列表" + "description": "RunnerSet 列表" } }, - "required": [ - "id", - "title", - "description", - "state", - "created_at", - "updated_at", - "projects" - ] + "description": "com.gitcode.openapi.pojo.action.runner.BizK8sRunnerSetListResp" } } }, @@ -41534,32 +46103,32 @@ } }, "security": [] - }, + } + }, + "/api/v8/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { "get": { - "summary": "获取企业里程碑详情", + "summary": "查询指定 Runner Group 下的所有主机 Runner", "deprecated": false, "description": "", - "operationId": "get_api_v8_enterprise_{enterprise_id}_milestones_{milestone_id}", + "operationId": "get_api_v8_orgs_{org}_actions_runner_groups_{runner_group_id}_runners", "tags": [ - "Enterprise" + "action" ], "parameters": [ { - "name": "enterprise", + "name": "org", "in": "path", - "description": "企业id", + "description": "组织path", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "milestone_id", + "name": "runner_group_id", "in": "path", - "description": "里程碑id", + "description": "", "required": true, - "example": "", "schema": { "type": "string" } @@ -41567,71 +46136,126 @@ { "name": "access_token", "in": "query", - "description": "用户授权码", + "description": "", "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "keyword", + "in": "query", + "description": "关键字过滤", "example": "", "schema": { "type": "string" } + }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "example": 1, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的项目数", + "example": 10, + "schema": { + "type": "integer" + } } ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { + "total_count": { "type": "integer", - "title": "id" - }, - "title": { - "type": "string", - "title": "标题" - }, - "description": { - "type": "string", - "title": "描述" - }, - "state": { - "type": "string", - "title": "状态" - }, - "created_at": { - "type": "string", - "title": "创建时间" - }, - "updated_at": { - "type": "string", - "title": "更新时间" - }, - "due_date": { - "type": "string", - "title": "截止时间" - }, - "start_date": { - "type": "string", - "title": "开始时间" + "description": "Runner 总数" }, - "projects": { + "runners": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Runner ID" + }, + "runner_group_id": { + "type": "string", + "description": "Runner Group ID" + }, + "runner_name": { + "type": "string", + "description": "Runner 名称" + }, + "name": { + "type": "string", + "description": "名称" + }, + "work_dir": { + "type": "string", + "description": "工作目录" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label_name": { + "type": "string", + "description": "标签名称" + }, + "label_value": { + "type": "string", + "description": "标签值" + }, + "label_color": { + "type": "string", + "description": "标签颜色" + } + }, + "description": "标签列表" + }, + "description": "标签列表" + }, + "status": { + "type": "string", + "description": "状态,\"IDLE\", \"BUSY\", \"OFFLINE\", \"DISABLE\"" + }, + "create_time": { + "type": "integer", + "description": "创建时间" + }, + "update_time": { + "type": "integer", + "description": "更新时间" + }, + "memory": { + "type": "number", + "description": "内存使用率(%)" + }, + "disk": { + "type": "number", + "description": "可用硬盘(GB)" + } + }, + "description": "Runner 列表" }, - "title": "关联的项目列表" + "description": "Runner 列表" } }, - "required": [ - "id", - "title", - "description", - "state", - "created_at", - "updated_at", - "projects" - ] + "description": "com.gitcode.openapi.pojo.action.runner.BizActionRunnerListResp" } } }, @@ -41639,32 +46263,32 @@ } }, "security": [] - }, - "delete": { - "summary": "删除企业里程碑", + } + }, + "/api/v8/orgs/{org}/actions/runner-groups/{runner_group_id}/runner-sets": { + "get": { + "summary": "查询指定 Runner Group 下的所有 K8S Runner", "deprecated": false, "description": "", - "operationId": "delete_api_v8_enterprise_{enterprise_id}_milestones_{milestone_id}", + "operationId": "get_api_v8_orgs_{org}_actions_runner_groups_{runner_group_id}_runners_sets", "tags": [ - "Enterprise" + "action" ], "parameters": [ { - "name": "enterprise", + "name": "org", "in": "path", - "description": "企业id", + "description": "组织path", "required": true, - "example": "", "schema": { "type": "string" } }, { - "name": "milestone_id", + "name": "runner_group_id", "in": "path", - "description": "里程碑id", + "description": "", "required": true, - "example": "", "schema": { "type": "string" } @@ -41672,156 +46296,186 @@ { "name": "access_token", "in": "query", - "description": "用户授权码", + "description": "", "required": true, - "example": "", "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "成功响应", - "content": { - "*/*": { - "schema": {} - } - }, - "headers": {} - } - }, - "security": [] - } - }, - "/api/v8/enterprises/{enterprise}/groups/projects": { - "get": { - "summary": "获取企业里程碑可以关联的项目列表", - "deprecated": false, - "description": "", - "operationId": "get_api_v8_enterprise_{enterprise_id}_groups_projects", - "tags": [ - "Enterprise" - ], - "parameters": [ + }, { - "name": "enterprise", - "in": "path", - "description": "企业id", - "required": true, + "name": "keyword", + "in": "query", + "description": "关键字过滤", "example": "", "schema": { "type": "string" } }, { - "name": "access_token", + "name": "page", "in": "query", - "description": "用户授权码", - "required": true, + "description": "当前页码", + "example": 1, "schema": { - "type": "string" + "type": "integer" } }, { - "name": "group_name", + "name": "per_page", "in": "query", - "description": "组织名称", - "required": false, + "description": "每页的项目数", + "example": 10, "schema": { - "type": "string" + "type": "integer" } } ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "title": "id" - }, - "full_name": { - "type": "string", - "title": "包含namespace的路径" - }, - "human_name": { - "type": "string", - "title": "包含namespace的名称" - }, - "path": { - "type": "string", - "title": "项目路径" - }, - "name": { - "type": "string", - "title": "项目名称" - }, - "created_at": { - "type": "string", - "title": "创建时间" + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "RunnerSet 总数" + }, + "runner_sets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "RunnerSet ID" + }, + "runner_group_id": { + "type": "string", + "description": "Runner Group ID" + }, + "name": { + "type": "string", + "description": "名称" + }, + "status": { + "type": "string", + "description": "状态,using 使用中 wait_release 释放中" + }, + "required_labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label_name": { + "type": "string", + "description": "标签名称" + }, + "label_value": { + "type": "string", + "description": "标签值" + }, + "label_color": { + "type": "string", + "description": "标签颜色" + } + }, + "description": "必需标签" + }, + "description": "必需标签" + }, + "min_runner_size": { + "type": "integer", + "description": "最小 Runner 数量" + }, + "max_runner_size": { + "type": "integer", + "description": "最大 Runner 数量" + }, + "limit_cpu": { + "type": "integer", + "description": "CPU 限制" + }, + "limit_memory": { + "type": "integer", + "description": "内存限制" + }, + "image_name": { + "type": "string", + "description": "镜像名称" + }, + "user_k8s_cluster_id": { + "type": "string", + "description": "用户 K8S 集群 ID" + }, + "user_k8s_cluster_name": { + "type": "string", + "description": "用户 K8S 集群名称" + }, + "user_k8s_resource_type": { + "type": "string", + "description": "用户 K8S 资源类型" + }, + "user_k8s_cluster_namespace": { + "type": "string", + "description": "用户 K8S 命名空间" + }, + "user_k8s_url": { + "type": "string", + "description": "用户 K8S 地址" + }, + "create_time": { + "type": "integer", + "description": "创建时间" + }, + "update_time": { + "type": "integer", + "description": "更新时间" + }, + "user_id": { + "type": "string", + "description": "用户 ID" + }, + "user_name": { + "type": "string", + "description": "用户名" + }, + "user_project_id": { + "type": "string", + "description": "用户项目 ID" + } + }, + "description": "RunnerSet 列表" }, - "updated_at": { - "type": "string", - "title": "更新时间" - } - }, - "required": [ - "id", - "full_name", - "human_name", - "path", - "name", - "created_at", - "updated_at" - ] - } + "description": "RunnerSet 列表" + } + }, + "description": "com.gitcode.openapi.pojo.action.runner.BizK8sRunnerSetListResp" } } }, - "headers": { - "total_count": { - "required": false, - "description": "总数量", - "schema": { - "type": "string" - } - }, - "total_page": { - "required": false, - "description": "总页数", - "schema": { - "type": "string" - } - } - } + "headers": {} } }, "security": [] } }, - "/api/v8/enterprises/{enterprise_id}/issue_extend_field": { + "/api/v8/orgs/{org}/actions/runner-groups": { "get": { - "summary": "获取企业Issue自定义字段列表", + "summary": "查询指定组织下的所有 Runner Group", "deprecated": false, "description": "", - "operationId": "get_api_v8_enterprises_{enterprises_id}_issue_extend_field", + "operationId": "get_api_v8_orgs_{org}_actions_runner_groups", "tags": [ - "Enterprise" + "action" ], "parameters": [ { - "name": "enterprise_id", + "name": "org", "in": "path", - "description": "企业id", + "description": "组织path", "required": true, - "example": "", "schema": { "type": "string" } @@ -41829,325 +46483,133 @@ { "name": "access_token", "in": "query", - "description": "用户授权码", + "description": "", "required": true, "schema": { "type": "string" } }, { - "name": "page", + "name": "keyword", "in": "query", - "description": "当前的页码:默认为 1", - "required": false, + "description": "关键字过滤", + "example": "", "schema": { "type": "string" } }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "example": 1, + "schema": { + "type": "integer" + } + }, { "name": "per_page", "in": "query", - "description": "每页的数量,最大为 100,默认 20", - "required": false, + "description": "每页的项目数", + "example": 10, "schema": { - "type": "string" + "type": "integer" } } ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "id" - }, - "name": { - "type": "string", - "description": "字段名称" - }, - "description": { - "type": "string", - "description": "字段描述" - }, - "field_type": { - "type": "string", - "description": "自定义字段的类型。text_single:单行文本,text_multi:多行文本,integer:整数,decimal:小数,date:日期,select_single:单选下拉,select_multi:多选下拉,member_single:单选成员,member_multi:多选成员" - }, - "field_visibility": { - "type": "integer", - "description": "可见性。0:仅管理员可见,1:所有人可见" - }, - "created_time": { - "type": "string", - "description": "创建时间" - }, - "updated_time": { - "type": "string", - "description": "更新时间" - }, - "options": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "extend_field_id": { - "type": "integer" - }, - "sort_num": { - "type": "integer" - }, - "field_value": { - "type": "string" - }, - "created_time": { - "type": "string" - }, - "updated_time": { - "type": "string" - } + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "Runner Group 总数" + }, + "runner_groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Runner Group ID" }, - "required": [ - "id", - "extend_field_id", - "sort_num", - "field_value", - "created_time", - "updated_time" - ] - }, - "description": "选项明细,仅选项类型返回" - }, - "types": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "sort_num": { - "type": "integer" - }, - "kind": { - "type": "integer" - } + "name": { + "type": "string", + "description": "名称" }, - "required": [ - "id", - "name", - "desc", - "enabled", - "sort_num", - "kind" - ] - }, - "description": "该字段关联的issue类型列表" - } - }, - "required": [ - "id", - "name", - "description", - "field_type", - "field_visibility", - "created_time", - "updated_time", - "options", - "types" - ] - } - }, - "examples": { - "1": { - "summary": "成功示例", - "value": { - "id": 48, - "name": "多选下拉", - "description": "", - "field_type": "select_multi", - "field_visibility": 0, - "created_time": "2025-12-18T14:50:25+08:00", - "updated_time": "2025-12-18T14:50:25+08:00", - "options": [ - { - "id": 51, - "extend_field_id": 48, - "sort_num": 9999, - "field_value": "1", - "created_time": "2025-12-18T14:50:34+08:00", - "updated_time": "2025-12-18T14:50:34+08:00" - }, - { - "id": 52, - "extend_field_id": 48, - "sort_num": 9999, - "field_value": "2", - "created_time": "2025-12-18T14:50:36+08:00", - "updated_time": "2025-12-18T14:50:36+08:00" - }, - { - "id": 53, - "extend_field_id": 48, - "sort_num": 9999, - "field_value": "3", - "created_time": "2025-12-18T14:50:38+08:00", - "updated_time": "2025-12-18T14:50:38+08:00" - }, - { - "id": 54, - "extend_field_id": 48, - "sort_num": 9999, - "field_value": "4", - "created_time": "2025-12-18T14:50:41+08:00", - "updated_time": "2025-12-18T14:50:41+08:00" - } - ], - "types": [ - { - "id": 425, - "name": "需求", - "desc": "", - "enabled": true, - "sort_num": 1, - "kind": 0 - } - ] - } - }, - "2": { - "summary": "成功示例", - "value": { - "id": 47, - "name": "test3", - "description": "", - "field_type": "select_single", - "field_visibility": 1, - "created_time": "2025-12-18T10:58:24+08:00", - "updated_time": "2025-12-18T10:58:24+08:00", - "options": [ - { - "id": 49, - "extend_field_id": 47, - "sort_num": 9999, - "field_value": "1", - "created_time": "2025-12-18T10:58:58+08:00", - "updated_time": "2025-12-18T10:58:58+08:00" + "runner_group_name": { + "type": "string", + "description": "Runner Group 名称" + }, + "namespace_id": { + "type": "string", + "description": "命名空间 ID" + }, + "creator": { + "type": "string", + "description": "创建人" + }, + "create_time": { + "type": "integer", + "description": "创建时间" + }, + "runner_count": { + "type": "integer", + "description": "Runner 数量" + }, + "namespace_type": { + "type": "string", + "description": "命名空间类型" + }, + "share_all": { + "type": "boolean", + "description": "是否分享给全部仓库" + } }, - { - "id": 50, - "extend_field_id": 47, - "sort_num": 9999, - "field_value": "2", - "created_time": "2025-12-18T10:59:02+08:00", - "updated_time": "2025-12-18T10:59:02+08:00" - } - ], - "types": [ - { - "id": 425, - "name": "需求", - "desc": "", - "enabled": true, - "sort_num": 1, - "kind": 0 - } - ] - } - }, - "3": { - "summary": "成功示例", - "value": { - "id": 46, - "name": "test2", - "description": "1", - "field_type": "text_single", - "field_visibility": 1, - "created_time": "2025-12-18T10:57:54+08:00", - "updated_time": "2025-12-18T10:57:54+08:00", - "types": [] + "description": "Runner Group 列表" + }, + "description": "Runner Group 列表" } }, - "4": { - "summary": "成功示例", - "value": { - "id": 45, - "name": "test1", - "description": "", - "field_type": "text_single", - "field_visibility": 0, - "created_time": "2025-12-18T10:46:51+08:00", - "updated_time": "2026-01-07T09:22:17+08:00", - "types": [ - { - "id": 425, - "name": "需求", - "desc": "", - "enabled": true, - "sort_num": 1, - "kind": 0 - } - ] - } - } + "description": "com.gitcode.openapi.pojo.action.runner.BizActionRunnerGroupListResp" } } }, - "headers": { - "total_count": { - "required": false, - "description": "总数量", - "schema": { - "type": "string" - } - }, - "total_page": { - "required": false, - "description": "总页数", - "schema": { - "type": "string" - } - } - } + "headers": {} } }, "security": [] } }, - "/api/v8/enterprises/{enterprise_id}/issues": { - "post": { - "summary": "获取企业Issue列表", + "/api/v8/orgs/{org}/actions/runner-groups/{runner_group_id}": { + "get": { + "summary": "获取指定 Runner Group 的详细信息", "deprecated": false, "description": "", - "operationId": "post_api_v8_enterprises_{enterprises_id}_issues", + "operationId": "get_api_v8_orgs_{org}_actions_runner_groups_{runner_group_id}", "tags": [ - "Enterprise" + "action" ], "parameters": [ { - "name": "enterprise_id", + "name": "org", "in": "path", - "description": "企业id", + "description": "组织path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "runner_group_id", + "in": "path", + "description": "", "required": true, - "example": "", "schema": { "type": "string" } @@ -42155,589 +46617,208 @@ { "name": "access_token", "in": "query", - "description": "用户授权码", + "description": "", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "description": "当前的页码:默认为 1" - }, - "per_page": { - "type": "integer", - "description": "每页的数量,最大为 100,默认 20" - }, - "labels": { - "type": "string", - "description": "标签,多个按英文逗号隔开" - }, - "sort": { - "type": "string", - "description": "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" - }, - "direction": { - "type": "string", - "description": "排序方式: 升序(asc),降序(desc)。默认: desc" - }, - "since": { - "type": "string", - "description": "起始的更新时间,要求时间格式为 ISO 8601" - }, - "assignees": { - "type": "array", - "items": { - "type": "string" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "runner_group_id": { + "type": "string", + "description": "Runner Group ID" }, - "description": "负责人的用户名" - }, - "milestone_ids": { - "type": "array", - "items": { - "type": "integer" + "runner_group_name": { + "type": "string", + "description": "Runner Group 名称" }, - "description": "企业里程碑id" - }, - "project_ids": { - "type": "array", - "items": { - "type": "integer" + "share_all": { + "type": "boolean", + "description": "是否分享给全部仓库" }, - "description": "项目id" - }, - "create_at": { - "type": "string", - "description": "任务创建日期,格式2024-11-09" - }, - "created_before": { - "type": "string", - "description": "任务创建截止时间,格式2024-11-09" - }, - "search": { - "type": "string", - "description": "通过关键字搜索issue标题" - }, - "issue_types": { - "type": "array", - "items": { - "type": "string" + "share_all_public_repos": { + "type": "boolean", + "description": "是否分享给全部公开仓库" }, - "description": "issue自定义类型" - }, - "issue_states": { - "type": "array", - "items": { - "type": "string" + "explicit_shared_repo_count": { + "type": "integer", + "description": "显式分享仓库数量" }, - "description": "issue自定义状态" - }, - "custom_fields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field_name": { - "type": "string" - }, - "values": { - "type": "array", - "items": { - "type": "string" - } - }, - "operation": { - "type": "string", - "description": "操作类型,可选值:search(模糊搜索), greater_equal(大于等于), less_equal(小于等于), between(在什么之间), in(精确匹配)" - } - }, - "required": [ - "operation" - ] + "created_at": { + "type": "integer", + "description": "创建时间" + }, + "updated_at": { + "type": "integer", + "description": "更新时间" } - } + }, + "description": "com.gitcode.openapi.pojo.action.runner.BizRunnerGroupDetailResp" } } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v8/orgs/{org}/actions/runner-groups/{runner_group_id}/shared-namespaces": { + "get": { + "summary": "查询有权访问指定 Runner Group 的仓库列表", + "deprecated": false, + "description": "", + "operationId": "get_api_v8_orgs_{org}_actions_runner_groups_{runner_group_id}_shared_namespaces", + "tags": [ + "action" + ], + "parameters": [ + { + "name": "org", + "in": "path", + "description": "组织path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "runner_group_id", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "access_token", + "in": "query", + "description": "", + "required": true, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "keyword", + "in": "query", + "description": "关键字过滤", + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "当前页码", + "example": 1, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "description": "每页的项目数", + "example": 10, + "schema": { + "type": "integer" } } - }, + ], "responses": { "200": { - "description": "成功响应", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "id" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "string" - }, - "state": { - "type": "string" - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "description": "有权访问的仓库总数" + }, + "shared_namespaces": { + "type": "array", + "items": { "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "分享记录 ID" }, - "object_id": { - "type": "string" + "runner_group_id": { + "type": "string", + "description": "Runner Group ID" }, - "login": { - "type": "string" + "from_namespace_id": { + "type": "string", + "description": "来源命名空间 ID" }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "object_id", - "login", - "name" - ], - "description": "作者" - }, - "repository": { - "type": "object", - "properties": { - "id": { - "type": "integer" + "to_namespace_id": { + "type": "string", + "description": "目标命名空间 ID" }, - "full_name": { - "type": "string" + "type": { + "type": "string", + "description": "类型" }, - "human_name": { - "type": "string" + "create_time": { + "type": "integer", + "description": "创建时间" }, - "path": { - "type": "string" + "update_time": { + "type": "integer", + "description": "更新时间" + }, + "namespace_id": { + "type": "string", + "description": "命名空间 ID" }, "name": { - "type": "string" + "type": "string", + "description": "名称" }, - "url": { - "type": "string" + "path": { + "type": "string", + "description": "路径" }, - "assigner": { - "type": "object", - "properties": {} + "visibility": { + "type": "string", + "description": "可见性,\"private\", \"public\", \"internal\"" }, - "paas": { - "type": "string" + "path_with_namespace": { + "type": "string", + "description": "完整路径" } }, - "required": [ - "id", - "full_name", - "human_name", - "path", - "name", - "url", - "assigner", - "paas" - ], - "description": "仓库信息" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "finished_at": { - "type": "string" - }, - "deadline": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "color" - ] - } - }, - "issue_state": { - "type": "string", - "description": "issue自定义状态" - }, - "comments": { - "type": "integer" - }, - "custom_fields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field_name": { - "type": "string" - }, - "field_values": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "field_name", - "field_values" - ] - }, - "description": "issue自定义字段" - }, - "issue_type": { - "type": "string", - "description": "issue类型" - }, - "issue_priority": { - "type": "string", - "description": "issue优先级" - }, - "url": { - "type": "string" - }, - "repository_url": { - "type": "string" - }, - "visibility_reason": { - "type": "string", - "description": "可见性,public:公开可见,confidential:私密,项目成员可见,other:其他原因导致的仅项目成员可见" - }, - "related_branches": { - "type": "array", - "items": { - "type": "string" - }, - "description": "关联的分支列表" + "description": "有权访问的仓库列表" }, - "linked_pulls": { - "type": "array", - "items": { - "type": "object", - "properties": { - "number": { - "type": "integer" - }, - "html_url": { - "type": "string" - }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" - } - }, - "required": [ - "id", - "login", - "name", - "avatar_url", - "html_url" - ] - }, - "id": { - "type": "integer" - }, - "project_id": { - "type": "integer" - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "state": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "merged_at": { - "type": "string" - }, - "merged_by": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "html_url": { - "type": "string" - } - }, - "required": [ - "id", - "login", - "name", - "avatar_url", - "html_url" - ] - }, - "closed_at": { - "type": "string" - }, - "target_branch": { - "type": "string" - }, - "source_branch": { - "type": "string" - }, - "source_project_id": { - "type": "integer" - }, - "target_project_id": { - "type": "integer" - } - }, - "required": [ - "number", - "html_url", - "user", - "id", - "project_id", - "title", - "body", - "state", - "created_at", - "updated_at", - "merged_at", - "merged_by", - "closed_at", - "target_branch", - "source_branch", - "source_project_id", - "target_project_id" - ] - }, - "description": "关联的pull_request列表" - } - } - } - }, - "examples": { - "1": { - "summary": "成功示例", - "value": { - "id": 48, - "name": "多选下拉", - "description": "", - "field_type": "select_multi", - "field_visibility": 0, - "created_time": "2025-12-18T14:50:25+08:00", - "updated_time": "2025-12-18T14:50:25+08:00", - "options": [ - { - "id": 51, - "extend_field_id": 48, - "sort_num": 9999, - "field_value": "1", - "created_time": "2025-12-18T14:50:34+08:00", - "updated_time": "2025-12-18T14:50:34+08:00" - }, - { - "id": 52, - "extend_field_id": 48, - "sort_num": 9999, - "field_value": "2", - "created_time": "2025-12-18T14:50:36+08:00", - "updated_time": "2025-12-18T14:50:36+08:00" - }, - { - "id": 53, - "extend_field_id": 48, - "sort_num": 9999, - "field_value": "3", - "created_time": "2025-12-18T14:50:38+08:00", - "updated_time": "2025-12-18T14:50:38+08:00" - }, - { - "id": 54, - "extend_field_id": 48, - "sort_num": 9999, - "field_value": "4", - "created_time": "2025-12-18T14:50:41+08:00", - "updated_time": "2025-12-18T14:50:41+08:00" - } - ], - "types": [ - { - "id": 425, - "name": "需求", - "desc": "", - "enabled": true, - "sort_num": 1, - "kind": 0 - } - ] - } - }, - "2": { - "summary": "成功示例", - "value": { - "id": 47, - "name": "test3", - "description": "", - "field_type": "select_single", - "field_visibility": 1, - "created_time": "2025-12-18T10:58:24+08:00", - "updated_time": "2025-12-18T10:58:24+08:00", - "options": [ - { - "id": 49, - "extend_field_id": 47, - "sort_num": 9999, - "field_value": "1", - "created_time": "2025-12-18T10:58:58+08:00", - "updated_time": "2025-12-18T10:58:58+08:00" - }, - { - "id": 50, - "extend_field_id": 47, - "sort_num": 9999, - "field_value": "2", - "created_time": "2025-12-18T10:59:02+08:00", - "updated_time": "2025-12-18T10:59:02+08:00" - } - ], - "types": [ - { - "id": 425, - "name": "需求", - "desc": "", - "enabled": true, - "sort_num": 1, - "kind": 0 - } - ] - } - }, - "3": { - "summary": "成功示例", - "value": { - "id": 46, - "name": "test2", - "description": "1", - "field_type": "text_single", - "field_visibility": 1, - "created_time": "2025-12-18T10:57:54+08:00", - "updated_time": "2025-12-18T10:57:54+08:00", - "types": [] + "description": "有权访问的仓库列表" } }, - "4": { - "summary": "成功示例", - "value": { - "id": 45, - "name": "test1", - "description": "", - "field_type": "text_single", - "field_visibility": 0, - "created_time": "2025-12-18T10:46:51+08:00", - "updated_time": "2026-01-07T09:22:17+08:00", - "types": [ - { - "id": 425, - "name": "需求", - "desc": "", - "enabled": true, - "sort_num": 1, - "kind": 0 - } - ] - } - } + "description": "com.gitcode.openapi.pojo.action.runner.BizActionRunnerSharedNamespaceListResp" } } }, - "headers": { - "total_count": { - "required": false, - "description": "总数量", - "schema": { - "type": "string" - } - }, - "total_page": { - "required": false, - "description": "总页数", - "schema": { - "type": "string" - } - } - } + "headers": {} } }, "security": [] } } }, - "webhooks": {}, "components": { "schemas": { "ImageData": { @@ -42869,11 +46950,9 @@ "description": "" }, "toStringValue": { - "type": [ - "string", - "null" - ], - "description": "" + "type": "string", + "description": "", + "nullable": true }, "wildcardType": { "type": "boolean" @@ -42885,21 +46964,13 @@ "type": "boolean" }, "subtypeSuffix": { - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true }, "charset": { - "oneOf": [ - { - "description": "java.nio.charset.Charset", - "$ref": "#/components/schemas/Charset" - }, - { - "type": "null" - } - ] + "description": "java.nio.charset.Charset", + "$ref": "#/components/schemas/Charset", + "nullable": true }, "qualityValue": { "type": "number", @@ -42916,15 +46987,9 @@ "description": "" }, "mediaType": { - "oneOf": [ - { - "description": "", - "$ref": "#/components/schemas/MediaType" - }, - { - "type": "null" - } - ] + "description": "", + "$ref": "#/components/schemas/MediaType", + "nullable": true } } }, @@ -43011,15 +47076,9 @@ "type": "object", "properties": { "delegate": { - "oneOf": [ - { - "description": "", - "$ref": "#/components/schemas/Runnable" - }, - { - "type": "null" - } - ] + "description": "", + "$ref": "#/components/schemas/Runnable", + "nullable": true } } }, @@ -43263,31 +47322,23 @@ "project_id": { "type": "integer", "description": "项目ID", - "examples": [ - 7270449 - ] + "example": 7270449 }, "prompt": { "type": "string", "description": "提示词", - "examples": [ - "一张超写实、电影感的照片..." - ] + "example": "一张超写实、电影感的照片..." }, "negativePrompt": { "type": "string", "description": "负面提示词", - "examples": [ - "" - ] + "example": "" }, "imageSize": { "type": "string", "description": "图像尺寸", "default": "1024x1024", - "examples": [ - "1024x1024" - ] + "example": "1024x1024" }, "batchSize": { "type": "integer", @@ -43295,17 +47346,13 @@ "minimum": 1, "maximum": 10, "default": 1, - "examples": [ - 1 - ] + "example": 1 }, "seed": { "type": "integer", "description": "随机种子", "format": "int64", - "examples": [ - 45 - ] + "example": 45 }, "numInferenceSteps": { "type": "integer", @@ -43313,9 +47360,7 @@ "minimum": 1, "maximum": 100, "default": 20, - "examples": [ - 20 - ] + "example": 20 }, "guidanceScale": { "type": "number", @@ -43323,9 +47368,7 @@ "minimum": 1, "maximum": 20, "default": 7.5, - "examples": [ - 7.5 - ] + "example": 7.5 }, "cfg": { "type": "number", @@ -43333,9 +47376,7 @@ "minimum": 1, "maximum": 30, "default": 4, - "examples": [ - 4 - ] + "example": 4 }, "image": { "type": "string", @@ -43372,9 +47413,7 @@ "status": { "type": "string", "description": "处理状态", - "examples": [ - "success" - ] + "example": "success" }, "error_message": { "type": "string", @@ -43393,23 +47432,17 @@ "model": { "type": "string", "description": "模型", - "examples": [ - "neutts-air" - ] + "example": "neutts-air" }, "input": { "type": "string", "description": "输入文本,只能输入英文,长度不能超过1000", - "examples": [ - "Good morning! This is a reminder that your meeting starts in ten minutes." - ] + "example": "Good morning! This is a reminder that your meeting starts in ten minutes." }, "voice": { "type": "string", "description": "音色类型,支持 \"dave\" 或 \"jo\",默认 \"dave", - "examples": [ - "dave" - ] + "example": "dave" } }, "required": [ diff --git a/internal/builder/build_test.go b/internal/builder/build_test.go index c3fb778..117d39a 100644 --- a/internal/builder/build_test.go +++ b/internal/builder/build_test.go @@ -295,10 +295,41 @@ func loadEmbeddedSpec(t *testing.T, svcName string, data []byte) *cobra.Command if err != nil { t.Fatalf("failed to load %s spec: %v", svcName, err) } + // Apply built-in normalizer rules (same as LoadSpec in registry). + normalizer := builtinNormalizer(svcName) + if normalizer != nil { + s = normalizer.Normalize(s) + } cfg := &config.Config{Services: map[string]config.ServiceConfig{svcName: {BaseURL: "http://x"}}} return Build(svcName, s, cfg, executor.New(cfg), view.NewRegistry()) } +// builtinNormalizer returns the built-in normalizer for a service, or nil. +func builtinNormalizer(svcName string) *spec.Normalizer { + switch svcName { + case "gitcode": + return spec.NewNormalizer(spec.NormalizeRule{ + ResourceAlias: map[string]string{ + "repositories": "repos", + "organizations": "orgs", + "pull-requests": "pulls", + }, + TagReassign: []spec.TagReassignRule{ + {PathPrefix: "/api/v5/repos/{owner}/{repo}/pulls", Tag: "Pulls"}, + {PathPrefix: "/api/v5/repos/{owner}/{repo}", Tag: "Repositories"}, + {PathPrefix: "/api/v5/repos/{owner}/{repo}/issues", Tag: "Issues"}, + {PathPrefix: "/api/v5/repos/{owner}/{repo}/labels", Tag: "Labels"}, + {PathPrefix: "/api/v5/repos/{owner}/{repo}/branches", Tag: "Branch"}, + {PathPrefix: "/api/v5/repos/{owner}/{repo}/tags", Tag: "Tag"}, + {PathPrefix: "/api/v5/repos/{owner}/{repo}/releases", Tag: "Release"}, + {PathPrefix: "/api/v5/repos/{owner}/{repo}/milestones", Tag: "Milestone"}, + }, + OpIDVerbExtract: true, + }) + } + return nil +} + func TestBuild_GitCodeUserCommands(t *testing.T) { // Verify that the GitCode OpenAPI spec produces correct user command names. // Regression test for issue where GET repos/{o}/{r} was incorrectly tagged diff --git a/internal/registry/builtin.go b/internal/registry/builtin.go index 1be8ab9..68a2e75 100644 --- a/internal/registry/builtin.go +++ b/internal/registry/builtin.go @@ -18,6 +18,7 @@ var ( }, TagReassign: []spec.TagReassignRule{ {PathPrefix: "/api/v5/repos/{owner}/{repo}/pulls", Tag: "Pulls"}, + {PathPrefix: "/api/v5/repos/{owner}/{repo}", Tag: "Repositories"}, {PathPrefix: "/api/v5/repos/{owner}/{repo}/issues", Tag: "Issues"}, {PathPrefix: "/api/v5/repos/{owner}/{repo}/labels", Tag: "Labels"}, {PathPrefix: "/api/v5/repos/{owner}/{repo}/branches", Tag: "Branch"}, diff --git a/internal/view/builtin.go b/internal/view/builtin.go index 3a2eb3e..a073a22 100644 --- a/internal/view/builtin.go +++ b/internal/view/builtin.go @@ -64,6 +64,34 @@ var builtinViews = map[string]map[string]ViewConfig{ {Field: "created_at", Label: "Created", Format: FormatDate, Width: 12}, }, }, + + "action/list": { + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "name", Label: "Name", Width: 24}, + {Field: "size_in_bytes", Label: "Size", Width: 12}, + {Field: "expired_at", Label: "Expires", Format: FormatDate, Width: 12}, + }, + }, + "action/list-runs": { + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "name", Label: "Workflow", Width: 28}, + {Field: "status", Label: "Status", Width: 12, Colorize: true}, + {Field: "conclusion", Label: "Conclusion", Width: 12, Colorize: true}, + {Field: "event", Label: "Event", Width: 10}, + {Field: "created_at", Label: "Created", Format: FormatDate, Width: 12}, + }, + }, + "action/list-jobs": { + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "name", Label: "Name", Width: 32}, + {Field: "status", Label: "Status", Width: 12, Colorize: true}, + {Field: "conclusion", Label: "Conclusion", Width: 12, Colorize: true}, + {Field: "started_at", Label: "Started", Format: FormatDate, Width: 12}, + }, + }, "repos/get": { Columns: []ViewColumn{ {Field: "full_name", Label: "Repo"}, diff --git a/scenarios/gitcode/action-artifacts.yaml b/scenarios/gitcode/action-artifacts.yaml new file mode 100644 index 0000000..dc0aa1e --- /dev/null +++ b/scenarios/gitcode/action-artifacts.yaml @@ -0,0 +1,17 @@ +name: "gitcode/action-artifacts" +service: gitcode +args: + - action + - list + - --owner + - openeuler + - --repo + - infrastructure +format: table +timeout_ms: 8000 +assertions: + - type: exit_code + value: 0 + - type: stdout_not_empty + - type: stderr_not_contains + value: "ERROR" diff --git a/scenarios/gitcode/action-runs.yaml b/scenarios/gitcode/action-runs.yaml new file mode 100644 index 0000000..409eef2 --- /dev/null +++ b/scenarios/gitcode/action-runs.yaml @@ -0,0 +1,17 @@ +name: "gitcode/action-runs" +service: gitcode +args: + - action + - list-runs + - --owner + - openeuler + - --repo + - infrastructure +format: table +timeout_ms: 8000 +assertions: + - type: exit_code + value: 0 + - type: stdout_not_empty + - type: stderr_not_contains + value: "ERROR" From 1290e270c1a771def5c179cdd73a507e3f607aba Mon Sep 17 00:00:00 2001 From: TommyLike Date: Tue, 21 Jul 2026 14:06:10 +0800 Subject: [PATCH 2/2] fix: address PR review feedback for GitCode actions support - Add /actions TagReassign rule to prevent bare repos rule from hijacking actions endpoints - Replace duplicated normalizer rules in tests with registry.New() to ensure parity with production LoadSpec behavior Co-Authored-By: Claude Opus 4.8 --- internal/builder/build_test.go | 41 +++++++++------------------------- internal/registry/builtin.go | 1 + 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/internal/builder/build_test.go b/internal/builder/build_test.go index 117d39a..01ff777 100644 --- a/internal/builder/build_test.go +++ b/internal/builder/build_test.go @@ -12,6 +12,7 @@ import ( "github.com/opensourceways/cora/assets" "github.com/opensourceways/cora/internal/config" "github.com/opensourceways/cora/internal/executor" + "github.com/opensourceways/cora/internal/registry" "github.com/opensourceways/cora/internal/spec" "github.com/opensourceways/cora/internal/view" ) @@ -295,39 +296,17 @@ func loadEmbeddedSpec(t *testing.T, svcName string, data []byte) *cobra.Command if err != nil { t.Fatalf("failed to load %s spec: %v", svcName, err) } - // Apply built-in normalizer rules (same as LoadSpec in registry). - normalizer := builtinNormalizer(svcName) - if normalizer != nil { - s = normalizer.Normalize(s) - } cfg := &config.Config{Services: map[string]config.ServiceConfig{svcName: {BaseURL: "http://x"}}} - return Build(svcName, s, cfg, executor.New(cfg), view.NewRegistry()) -} - -// builtinNormalizer returns the built-in normalizer for a service, or nil. -func builtinNormalizer(svcName string) *spec.Normalizer { - switch svcName { - case "gitcode": - return spec.NewNormalizer(spec.NormalizeRule{ - ResourceAlias: map[string]string{ - "repositories": "repos", - "organizations": "orgs", - "pull-requests": "pulls", - }, - TagReassign: []spec.TagReassignRule{ - {PathPrefix: "/api/v5/repos/{owner}/{repo}/pulls", Tag: "Pulls"}, - {PathPrefix: "/api/v5/repos/{owner}/{repo}", Tag: "Repositories"}, - {PathPrefix: "/api/v5/repos/{owner}/{repo}/issues", Tag: "Issues"}, - {PathPrefix: "/api/v5/repos/{owner}/{repo}/labels", Tag: "Labels"}, - {PathPrefix: "/api/v5/repos/{owner}/{repo}/branches", Tag: "Branch"}, - {PathPrefix: "/api/v5/repos/{owner}/{repo}/tags", Tag: "Tag"}, - {PathPrefix: "/api/v5/repos/{owner}/{repo}/releases", Tag: "Release"}, - {PathPrefix: "/api/v5/repos/{owner}/{repo}/milestones", Tag: "Milestone"}, - }, - OpIDVerbExtract: true, - }) + // Use registry to load the spec with normalizer rules (same as production). + cfg.SpecCache.Dir = t.TempDir() + reg := registry.New(cfg) + entry, err := reg.Lookup(svcName) + if err == nil { + if normalized, loadErr := entry.LoadSpec(context.Background()); loadErr == nil { + s = normalized + } } - return nil + return Build(svcName, s, cfg, executor.New(cfg), view.NewRegistry()) } func TestBuild_GitCodeUserCommands(t *testing.T) { diff --git a/internal/registry/builtin.go b/internal/registry/builtin.go index 68a2e75..7de96e1 100644 --- a/internal/registry/builtin.go +++ b/internal/registry/builtin.go @@ -18,6 +18,7 @@ var ( }, TagReassign: []spec.TagReassignRule{ {PathPrefix: "/api/v5/repos/{owner}/{repo}/pulls", Tag: "Pulls"}, + {PathPrefix: "/api/v5/repos/{owner}/{repo}/actions", Tag: "action"}, {PathPrefix: "/api/v5/repos/{owner}/{repo}", Tag: "Repositories"}, {PathPrefix: "/api/v5/repos/{owner}/{repo}/issues", Tag: "Issues"}, {PathPrefix: "/api/v5/repos/{owner}/{repo}/labels", Tag: "Labels"},