{ "swagger": "2.0", "info": { "title": "CNB OPENAPI", "contact": { "name": "Open API Support", "url": "https://docs.cnb.cool/", "email": "cnb@tencent.com" }, "version": "1.0" }, "paths": { "/events/{repo}/-/{date}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Event" ], "summary": "获取仓库动态预签名地址,并返回内容。Get events pre-signed URL and return content.", "operationId": "GetEvents", "parameters": [ { "type": "string", "description": "repo path", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "动态日期,支持按天或小时为维度获取,格式为yy-mm-dd-h or yy-mm-dd, eg:2025-09-11-5", "name": "date", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } }, "/groups": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "创建新组织。Create new organization.", "operationId": "CreateOrganization", "parameters": [ { "description": "group information", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateGroupReq" } } ], "responses": { "201": { "description": "Created" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw"} }, "/user": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Users" ], "summary": "获取指定用户的详情信息。Get detailed information for a specified user.", "operationId": "GetUserInfo", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.UsersResultForSelf" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Users" ], "summary": "更新指定用户的详情信息。Updates the specified user's profile information.", "operationId": "UpdateUserInfo", "parameters": [ { "description": "user info", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateUserInfoPayload" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:rw"} }, "/user/autocomplete_source": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Users" ], "summary": "查询当前用户用户拥有指定权限的所有资源列表。List resources that the current user has specified permissions for.", "operationId": "AutoCompleteSource", "parameters": [ { "enum": [ "Group", "Repo" ], "type": "string", "default": "Group", "description": "Source type", "name": "source_type", "in": "query" }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "type": "string", "default": "", "description": "Filter by resources.", "name": "search", "in": "query" }, { "enum": [ "Reporter", "Developer", "Master", "Owner" ], "type": "string", "default": "Owner", "description": "最小仓库权限,默认owner。Minima repository permissions", "name": "access", "in": "query" }, { "enum": [ "created_at", "slug_path" ], "type": "string", "default": "created_at", "description": "Order field", "name": "order_by", "in": "query" }, { "type": "boolean", "default": false, "description": "排序顺序。Ordering.", "name": "desc", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "string" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/user/gpg-keys": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Users" ], "summary": "获取用户 GPG keys 列表。List GPG Keys.", "operationId": "ListGPGKeys", "parameters": [ { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "pagination page size", "name": "page_size", "in": "query" }, { "type": "string", "description": "gpg search key", "name": "keyword", "in": "query" } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.GPGPublicKey" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:r"} }, "/user/groups": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "获取当前用户拥有权限的顶层组织列表。Get top-level organizations list that the current user has access to.", "operationId": "ListTopGroups", "parameters": [ { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "type": "string", "default": "", "description": "Filter by organizations.", "name": "search", "in": "query" }, { "enum": [ "Guest", "Reporter", "Developer", "Master", "Owner" ], "type": "string", "description": "Filter by role.", "name": "role", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.OrganizationAccess" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/user/groups/{slug}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "查询当前用户在指定组织下拥有指定权限的子组织列表。Get the list of sub-organizations that the current user has access to in the specified organization.", "operationId": "ListGroups", "parameters": [ { "type": "string", "description": "Group slug", "name": "slug", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "type": "integer", "description": "access level", "name": "access", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.OrganizationAccess" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/user/repos": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "获取当前用户拥有指定权限及其以上权限的仓库。List repositories owned by the current user with the specified permissions or higher.", "operationId": "GetRepos", "parameters": [ { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "type": "string", "default": "", "description": "Filter by repositories", "name": "search", "in": "query" }, { "enum": [ "private", "public", "secret" ], "type": "string", "description": "RType", "name": "filter_type", "in": "query" }, { "enum": [ "Reporter", "Developer", "Master", "Owner" ], "type": "string", "default": "Owner", "description": "最小仓库权限,默认owner。Minima repository permissions", "name": "role", "in": "query" }, { "enum": [ "KnowledgeBase" ], "type": "string", "description": "仓库类型标记,逗号分隔。Repository type flags, comma separated", "name": "flags", "in": "query" }, { "enum": [ "active", "archived" ], "type": "string", "description": "仓库状态。Repository status", "name": "status", "in": "query" }, { "enum": [ "created_at", "last_updated_at", "stars", "slug_path", "forks" ], "type": "string", "default": "last_updated_at", "description": "Order field", "name": "order_by", "in": "query" }, { "type": "boolean", "default": false, "description": "排序顺序。Ordering.", "name": "desc", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Repos4User" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/user/stared-repos": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Starring" ], "summary": "获取当前用户 star 的仓库列表。List all stared repositories.", "operationId": "GetUserAllStaredRepos", "parameters": [ { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "type": "string", "default": "", "description": "Filter by repositories", "name": "search", "in": "query" }, { "type": "boolean", "default": false, "description": "排序顺序。Ordering.", "name": "desc", "in": "query" }, { "enum": [ "created_at", "last_updated_at", "stared_time", "stars", "forks" ], "type": "string", "default": "last_updated_at", "description": "Order field", "name": "order_by", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Repos4User" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/users/{username}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Users" ], "summary": "获取指定用户的详情信息。Get detailed information for a specified user.", "operationId": "GetUserInfoByName", "parameters": [ { "type": "string", "description": "User Name", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.UsersResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:r"} }, "/users/{username}/activities": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Activities" ], "summary": "获取个人动态活跃详情汇总。Get user activities by date.", "operationId": "GetUserActivitiesByDate", "parameters": [ { "type": "string", "description": "UserName", "name": "username", "in": "path", "required": true }, { "type": "string", "description": "查询日期,格式 yyyyMM,或者 yyyyMMdd", "name": "date", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ActivityDate" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/users/{username}/followers": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Followers" ], "summary": "获取指定用户的粉丝列表。Get the followers list of specified user.", "operationId": "GetFollowersByUserID", "parameters": [ { "type": "string", "description": "Username", "name": "username", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.UserFollowResult" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/users/{username}/following": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Followers" ], "summary": "获取指定用户的关注人列表。Get the list of users that the specified user is following.", "operationId": "GetFollowingByUserID", "parameters": [ { "type": "string", "description": "Username", "name": "username", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.UserFollowResult" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/users/{username}/groups": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "获取指定用户拥有权限的顶层组织列表。 Get a list of top-level organizations that the specified user has permissions to access.", "operationId": "GetGroupsByUserID", "parameters": [ { "type": "string", "description": "UserName", "name": "username", "in": "path", "required": true }, { "type": "string", "default": "", "description": "Filter organizations.", "name": "search", "in": "query" }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.OrganizationUnion" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/users/{username}/pinned-repos": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "获取指定用户的用户仓库墙。 Get a list of repositories that the specified user has pinned.", "operationId": "GetPinnedRepoByID", "parameters": [ { "type": "string", "description": "User Name", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Repos4User" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/users/{username}/repo-activities/{activityType}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Activities" ], "summary": "个人仓库动态详情列表。List of personal repository activity details.", "operationId": "GetUserRepoActivityDetails", "parameters": [ { "type": "string", "description": "UserName", "name": "username", "in": "path", "required": true }, { "enum": [ "issue", "pull_request", "code_review" ], "type": "string", "description": "activity type", "name": "activityType", "in": "path", "required": true }, { "type": "string", "description": "仓库路径", "name": "slug", "in": "query", "required": true }, { "type": "string", "description": "查询日期,格式 yyyyMM,或者 yyyyMMdd", "name": "date", "in": "query", "required": true } ], "responses": { "200": { "description": "返回 []dto.ActivityPullRequestDetail|[]dto.ActivityIssueDetail", "schema": { "type": "array", "items": {} } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/users/{username}/repos": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "获取指定用户有指定以上权限并且客人态可见的仓库。List repositories where the specified user has the specified permission level or higher and are visible to guests.", "operationId": "GetReposByUserName", "parameters": [ { "type": "string", "description": "UserName", "name": "username", "in": "path", "required": true }, { "type": "string", "default": "", "description": "Filter by repositories", "name": "search", "in": "query" }, { "enum": [ "private", "public", "secret" ], "type": "string", "description": "Repositories type", "name": "filter_type", "in": "query" }, { "enum": [ "KnowledgeBase" ], "type": "string", "description": "仓库类型标记,逗号分隔。Repository type flags, comma separated", "name": "flags", "in": "query" }, { "enum": [ "active", "archived" ], "type": "string", "description": "仓库状态。Repository status", "name": "status", "in": "query" }, { "enum": [ "Reporter", "Developer", "Master", "Owner" ], "type": "string", "default": "Owner", "description": "最小仓库权限,默认owner。Minima repository permissions.", "name": "role", "in": "query" }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "type": "boolean", "default": false, "description": "排序顺序。Ordering.", "name": "desc", "in": "query" }, { "enum": [ "created_at", "last_updated_at", "stars", "slug_path", "forks" ], "type": "string", "default": "last_updated_at", "description": "Order field", "name": "order_by", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Repos4User" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/users/{username}/stared-repos": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Starring" ], "summary": "获取指定用户的 star 仓库列表。Get the list of repositories starred by the specified user.", "operationId": "GetUserStaredRepos", "parameters": [ { "type": "string", "description": "UserName", "name": "username", "in": "path", "required": true }, { "type": "string", "default": "", "description": "过滤仓库。Filter by repositories", "name": "search", "in": "query" }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "type": "boolean", "default": false, "description": "Ordering", "name": "desc", "in": "query" }, { "enum": [ "created_at", "last_updated_at", "stars", "forks" ], "type": "string", "default": "last_updated_at", "description": "Order field", "name": "order_by", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Repos4User" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/workspace/delete": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Workspace" ], "summary": "删除我的云原生开发环境。Delete my workspace.", "operationId": "DeleteWorkspace", "parameters": [ { "description": "params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.WorkspaceDeleteReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.WorkspaceDeleteResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:rw"} }, "/workspace/list": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Workspace" ], "summary": "获取我的云原生开发环境列表。List my workspaces.", "operationId": "ListWorkspaces", "parameters": [ { "type": "string", "description": "Git branch name, e.g. \"main\"", "name": "branch", "in": "query" }, { "type": "string", "description": "查询结束时间。Query end time. format YYYY-MM-DD HH:mm:ssZZ, e.g. 2024-12-01 00:00:00+0800", "name": "end", "in": "query" }, { "type": "integer", "description": "Pagination page number, default(1)", "name": "page", "in": "query" }, { "type": "integer", "description": "Pagination page size, default(20), max(100)", "name": "pageSize", "in": "query" }, { "type": "string", "description": "Repository path, e.g. \"groupname/reponame\"", "name": "slug", "in": "query" }, { "type": "string", "description": "查询开始时间。Query start time. format YYYY-MM-DD HH:mm:ssZZ, e.g. 2024-12-01 00:00:00+0800", "name": "start", "in": "query" }, { "type": "string", "description": "开发环境状态,running: 开发环境已启动,closed:开发环境已关闭。Workspace status: \"running\" for started, \"closed\" for stopped.", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.WorkspaceListResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"} }, "/workspace/stop": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Workspace" ], "summary": "停止/关闭我的云原生开发环境。Stop/close my workspace.", "operationId": "WorkspaceStop", "parameters": [ { "description": "params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.WorkspaceStopReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.WorkspaceStopResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:rw"} }, "/{group}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "获取指定组织信息。Get information for the specified organization.", "operationId": "GetGroup", "parameters": [ { "type": "string", "description": "group path", "name": "group", "in": "path", "required": true } ], "responses": { "200": { "description": "group", "schema": { "$ref": "#/definitions/dto.OrganizationAccess" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "更新组织信息, 可更新的内容为: 组织描述, 组织展示名称, 组织网站, 组织联系邮箱。Updates organization information including: description, display name, website URL and contact email.", "operationId": "UpdateOrganization", "parameters": [ { "type": "string", "description": "slug", "name": "group", "in": "path", "required": true }, { "description": "group information to update", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateGroupReq" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw"}, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "删除指定组织。Delete the specified organization.", "operationId": "DeleteOrganization", "parameters": [ { "type": "string", "description": "group path", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.", "name": "x-cnb-identity-ticket", "in": "header" } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-delete:rw"} }, "/{group}/-/inherit-members": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "获取指定组织的继承成员。List inherited members within specified organization", "operationId": "ListInheritMembersOfGroup", "parameters": [ { "type": "string", "description": "slug", "name": "group", "in": "path", "required": true }, { "type": "string", "default": "", "description": "过滤成员。Filter by member", "name": "search", "in": "query" }, { "enum": [ "Guest", "Reporter", "Developer", "Master", "Owner" ], "type": "string", "description": "Role", "name": "role", "in": "query" }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.ListInheritMembers" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r"} }, "/{group}/-/members": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "获取指定组织内的所有直接成员。List all direct members within specified organization.", "operationId": "ListMembersOfGroup", "parameters": [ { "type": "string", "description": "slug", "name": "group", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "enum": [ "Guest", "Reporter", "Developer", "Master", "Owner" ], "type": "string", "description": "Role", "name": "role", "in": "query" }, { "type": "string", "default": "", "description": "过滤成员。Filter by member.", "name": "search", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.UsersWithAccessLevelInSlug" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r"} }, "/{group}/-/members/access-level": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "获取指定组织内, 访问成员在当前层级内的权限信息。Get permission information for accessing members at current level.", "operationId": "GetMemberAccessLevelOfGroup", "parameters": [ { "type": "string", "description": "slug", "name": "group", "in": "path", "required": true }, { "type": "boolean", "default": true, "description": "是否包含继承的权限。If inherited permissions are included.", "name": "include_inherit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.MemberAccessLevelInSlugUnion" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r"} }, "/{group}/-/members/{username}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "更新指定组织的直接成员权限信息。Update permission information for direct members in specified organization.", "operationId": "UpdateMembersOfGroup", "parameters": [ { "type": "string", "description": "slug", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true }, { "description": "member information", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMembersRequest" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "添加成员。Add members.", "operationId": "AddMembersOfGroup", "parameters": [ { "type": "string", "description": "slug", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true }, { "description": "member information", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMembersRequest" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw"}, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "删除指定组织的直接成员。Remove direct members from specified organization.", "operationId": "DeleteMembersOfGroup", "parameters": [ { "type": "string", "description": "slug", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw"} }, "/{group}/-/members/{username}/access-level": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "获取指定组织内指定成员的权限信息, 结果按组织层级来展示, 包含上层组织的权限继承信息。Get specified member's permissions with organizational hierarchy.", "operationId": "ListMemberAccessLevelOfGroup", "parameters": [ { "type": "string", "description": "slug", "name": "group", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.MemberAccessLevel" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r"} }, "/{group}/-/transfer": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "转移组织。Transfer an organization.", "operationId": "TransferGroup", "parameters": [ { "type": "string", "description": "slug", "name": "group", "in": "path", "required": true }, { "description": "request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.TransferSlugReq" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw"} }, "/{group}/-/upload/logos": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Organizations" ], "summary": "发起一个上传 logo 的请求,返回上传文件的url,请使用 put 发起流式上传。Initiate a request to upload logo,returns upload URL.Use PUT to initiate a stream upload.", "operationId": "UploadLogos", "parameters": [ { "type": "string", "description": "group", "name": "group", "in": "path", "required": true }, { "description": "UploadRequestParams", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UploadRequestParams" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.UploadAssetsResponse" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw"} }, "/{mission}": { "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Missions" ], "summary": "删除指定任务集。Delete the specified mission.", "operationId": "DeleteMission", "parameters": [ { "type": "string", "description": "mission path", "name": "mission", "in": "path", "required": true }, { "type": "string", "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.", "name": "x-cnb-identity-ticket", "in": "header" } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-delete:rw"} }, "/{mission}/-/members/{username}": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "添加成员。Add members.", "operationId": "AddMembersOfMission", "parameters": [ { "type": "string", "description": "slug", "name": "mission", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true }, { "description": "member information", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMembersRequest" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:rw"} }, "/{mission}/-/mission/view": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Missions" ], "summary": "查询任务集视图配置信息。Get mission view config.", "operationId": "GetMissionViewConfig", "parameters": [ { "type": "string", "description": "Mission slug", "name": "mission", "in": "path", "required": true }, { "type": "string", "description": "View ID", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.MissionViewConfig" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Missions" ], "summary": "设置任务集视图配置信息。Set mission view config.", "operationId": "PostMissionViewConfig", "parameters": [ { "type": "string", "description": "Mission slug", "name": "mission", "in": "path", "required": true }, { "description": "Params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.MissionViewConfig" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:rw"} }, "/{mission}/-/mission/view-list": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Missions" ], "summary": "获取任务集视图列表。Get view list of a mission.", "operationId": "GetMissionViewList", "parameters": [ { "type": "string", "description": "mission", "name": "mission", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.MissionView" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Missions" ], "summary": "添加、修改任务集视图。Update a mission view or add a new one.", "operationId": "PutMissionViewList", "parameters": [ { "type": "string", "description": "Mission slug", "name": "mission", "in": "path", "required": true }, { "description": "Params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.MissionView" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:rw"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Missions" ], "summary": "排序任务集视图。Sort mission view list.", "operationId": "PostMissionViewList", "parameters": [ { "type": "string", "description": "Mission slug", "name": "mission", "in": "path", "required": true }, { "description": "Params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.MissionPostViewReq" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:rw"} }, "/{mission}/-/settings/set_visibility": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Missions" ], "summary": "改变任务集可见性。Update the visibility of a mission.", "operationId": "SetMissionVisibility", "parameters": [ { "type": "string", "description": "mission path", "name": "mission", "in": "path", "required": true }, { "enum": [ "Private", "Public" ], "type": "string", "description": "任务集可见性", "name": "visibility", "in": "query", "required": true } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:rw"} }, "/{registry}": { "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Registries" ], "summary": "删除制品库。Delete the registry.", "operationId": "DeleteRegistry", "parameters": [ { "type": "string", "description": "制品库路径。Registry path.", "name": "registry", "in": "path", "required": true }, { "type": "string", "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.", "name": "x-cnb-identity-ticket", "in": "header" } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-delete:rw"} }, "/{registry}/-/members/{username}": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "添加成员。Add members.", "operationId": "AddMembersOfRegistry", "parameters": [ { "type": "string", "description": "slug", "name": "registry", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true }, { "description": "member information", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMembersRequest" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-manage:rw"} }, "/{registry}/-/settings/set_visibility": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Registries" ], "summary": "改变制品仓库可见性。Update visibility of registry.", "operationId": "SetRegistryVisibility", "parameters": [ { "type": "string", "description": "制品库路径。Registry path.", "name": "registry", "in": "path", "required": true }, { "enum": [ "Private", "Public" ], "type": "string", "description": "可见性。Visibility", "name": "visibility", "in": "query", "required": true } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-manage:rw"} }, "/{repo}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "获取指定仓库信息。Get information for the specified repository.", "operationId": "GetByID", "parameters": [ { "type": "string", "description": "repo path", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "repo", "schema": { "$ref": "#/definitions/dto.Repos4User" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-basic-info:r"}, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "删除指定仓库。Delete the specified repository.", "operationId": "DeleteRepo", "parameters": [ { "type": "string", "description": "repo path", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.", "name": "x-cnb-identity-ticket", "in": "header" } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-delete:rw"}, "patch": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "更新仓库信息, 可更新的内容为: 仓库简介, 仓库站点, 仓库主题, 开源许可证。updates repository details including description, website URL,topics and license type.", "operationId": "UpdateRepo", "parameters": [ { "type": "string", "description": "repo path", "name": "repo", "in": "path", "required": true }, { "description": "request body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.RepoPatch" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"} }, "/{repo}/-/ai/chat/completions": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "AI" ], "summary": "AI 对话。调用者需有代码写权限(CI 中使用 CNB_TOKEN 不检查写权限)。AI chat completions. Requires caller to have repo write permission (except when using CNB_TOKEN in CI).", "operationId": "AiChatCompletions", "parameters": [ { "type": "string", "description": "仓库完整路径", "name": "repo", "in": "path", "required": true }, { "description": "AI chat completions params. The params may differ by model.", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.AiChatCompletionsReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.AiChatCompletionsResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/assets/{assetID}": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "通过 asset 记录 id 删除一个 asset,release和commit附件不能通过该接口删除\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw", "tags": [ "Assets" ], "summary": "通过 asset 记录 id 删除一个 asset", "operationId": "DeleteAsset", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "format": "int64", "description": "asset id", "name": "assetID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" }, "422": { "description": "release和commit附件不能通过该接口删除", "schema": { "$ref": "#/definitions/die.WebError" } } } } }, "/{repo}/-/badge/git/{sha}/{badge}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Badge" ], "summary": "获取徽章 svg 或 JSON 数据。Get badge svg or JSON data.", "operationId": "GetBadge", "parameters": [ { "type": "string", "description": "仓库完整路径", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "latest 或 commit 8 位短 hash(例如 89d48c07)", "name": "sha", "in": "path", "required": true }, { "type": "string", "description": "徽章名,例如 pr 事件徽章名为:ci/status/pull_request, 如需获取 JSON 数据,可加上 .json 后缀,如:ci/status/pull_request.json", "name": "badge", "in": "path", "required": true }, { "description": "GetBadge params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.GetBadgeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.GetBadgeResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-commit-status:r"} }, "/{repo}/-/badge/list": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Badge" ], "summary": "获取徽章列表数据。List badge data", "operationId": "ListBadge", "parameters": [ { "type": "string", "description": "仓库完整路径", "name": "repo", "in": "path", "required": true }, { "description": "ListBadge params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ListBadgeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ListBadgeResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-commit-status:r"} }, "/{repo}/-/badge/upload": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Badge" ], "summary": "上传徽章数据。Upload badge data", "operationId": "UploadBadge", "parameters": [ { "type": "string", "description": "仓库完整路径", "name": "repo", "in": "path", "required": true }, { "description": "UploadBadge params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UploadBadgeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.UploadBadgeResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-commit-status:rw"} }, "/{repo}/-/build/ai/auto-pr": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "AI" ], "summary": "根据传入的需求内容和需求标题借助 AI 自动编码并提 PR。Automatically code and create a PR with AI based on the input requirement content and title.", "operationId": "AiAutoPr", "parameters": [ { "type": "string", "description": "仓库完整路径", "name": "repo", "in": "path", "required": true }, { "description": "AI auto PR params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.AiAutoPrReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.AiAutoPrResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/build/crontab/sync/{branch}": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Build" ], "summary": "同步仓库分支下的定时任务。 Synchronize the content under the repository branch.", "operationId": "BuildCrontabSync", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "Branch", "name": "branch", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.BuildCommonResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:rw"} }, "/{repo}/-/build/logs": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Build" ], "summary": "查询流水线构建列表。List pipeline builds.", "operationId": "GetBuildLogs", "parameters": [ { "type": "string", "description": "Repo path", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "Start date in \"YYYY-MM-DD\" format, e.g. \"2024-12-01\"", "name": "createTime", "in": "query" }, { "type": "string", "description": "End date in \"YYYY-MM-DD\" format, e.g. \"2024-12-01\"", "name": "endTime", "in": "query" }, { "type": "string", "description": "Event name, e.g. \"push\"", "name": "event", "in": "query" }, { "type": "integer", "description": "Pagination page number, default(1)", "name": "page", "in": "query" }, { "type": "integer", "description": "Pagination page size, default(30), max(100)", "name": "pagesize", "in": "query" }, { "type": "string", "description": "Commit ID, e.g. \"2221d4535ec0c921bcd0858627c5025a871dd2b5\"", "name": "sha", "in": "query" }, { "type": "string", "description": "Build SN, e.g. \"cnb-1qa-1i3f5ecau", "name": "sn", "in": "query" }, { "type": "string", "description": "Source branch name, e.g. \"dev\"", "name": "sourceRef", "in": "query" }, { "type": "string", "description": "Build status: \"pending\", \"success\", \"error\", \"cancel\"", "name": "status", "in": "query" }, { "type": "string", "description": "Target branch name, e.g. \"main\"", "name": "targetRef", "in": "query" }, { "type": "string", "description": "User ID", "name": "userId", "in": "query" }, { "type": "string", "description": "Username", "name": "userName", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.BuildLogsResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:r"} }, "/{repo}/-/build/logs/stage/{sn}/{pipelineId}/{stageId}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Build" ], "summary": "查询流水线Stage详情。Get pipeline build stage detail.", "operationId": "GetBuildStage", "parameters": [ { "type": "string", "description": "Repo path", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "SN", "name": "sn", "in": "path", "required": true }, { "type": "string", "description": "PipelineId", "name": "pipelineId", "in": "path", "required": true }, { "type": "string", "description": "stageId", "name": "stageId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.BuildStageResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:r"} }, "/{repo}/-/build/logs/{sn}": { "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Build" ], "summary": "删除流水线日志内容。Delete pipeline logs content.", "operationId": "BuildLogsDelete", "parameters": [ { "type": "string", "description": "Repo path", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "Sn", "name": "sn", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.BuildCommonResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:rw"} }, "/{repo}/-/build/runner/download/log/{pipelineId}": { "get": { "security": [ { "BearerAuth": [] } ], "tags": [ "Build" ], "summary": "流水线runner日志下载。Pipeline runner log download.", "operationId": "BuildRunnerDownloadLog", "parameters": [ { "type": "string", "description": "Repo path", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "PipelineId", "name": "pipelineId", "in": "path", "required": true } ], "responses": { "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:r"} }, "/{repo}/-/build/start": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Build" ], "summary": "开始一个构建。Start a build.", "operationId": "StartBuild", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "description": "Build params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.StartBuildReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.BuildResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:rw"} }, "/{repo}/-/build/status/{sn}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Build" ], "summary": "查询流水线构建状态。Get pipeline build status.", "operationId": "GetBuildStatus", "parameters": [ { "type": "string", "description": "Repo path", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "SN", "name": "sn", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.BuildStatusResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:r"} }, "/{repo}/-/build/stop/{sn}": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Build" ], "summary": "停止一个构建。 Stop a build.", "operationId": "StopBuild", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "SN", "name": "sn", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.BuildResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:rw"} }, "/{repo}/-/commit-assets/download/{commit_id}/{filename}": { "get": { "security": [ { "BearerAuth": [] } ], "tags": [ "Git" ], "summary": "发起一个获取 commits 附件的请求, 302到有一定效期的下载地址。Get a request to fetch a commit assets and returns 302 redirect to the assets URL with specific valid time.", "operationId": "GetCommitAssets", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交的哈希值。", "name": "commit_id", "in": "path", "required": true }, { "type": "string", "description": "文件名称。示例:`test.png`", "name": "filename", "in": "path", "required": true }, { "type": "boolean", "default": false, "description": "是否可以下载,true表示302的下载地址有效期12小时,最多下载10次。", "name": "share", "in": "query" } ], "responses": { "302": { "description": "Found" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r"} }, "/{repo}/-/files/{filePath}": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "删除 UploadFiles 上传的附件\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw", "tags": [ "Pulls", "Issues" ], "summary": "删除 UploadFiles 上传的附件", "operationId": "DeleteRepoFiles", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "文件访问链接的files后半部分,比如链接是 https://cnb.cool/cnb/feedback/-/files/abc/1234abcd/test.zip,filePath 就是 abc/1234abcd/test.zip", "name": "filePath", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } }, "/{repo}/-/forks": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "获取指定仓库的 fork 列表。Get fork list for specified repository.", "operationId": "ListForksRepos", "parameters": [ { "type": "string", "description": "仓库路径。Repository path.", "name": "repo", "in": "path", "required": true }, { "type": "boolean", "default": false, "description": "是否从fork根节点开始展示。Whether to start from the root node of the fork.", "name": "start_from_root", "in": "query" }, { "type": "integer", "default": 1, "description": "页码。Pagination page number.", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页大小。Pagination page size.", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ListForks" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-base-info:r"} }, "/{repo}/-/git/archive-commit-changed-files/{sha1}": { "get": { "security": [ { "BearerAuth": [] } ], "tags": [ "Git" ], "summary": "打包下载 commit 变更文件。Download archive of changed files for a commit.", "operationId": "GetArchiveCommitChangedFiles", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交的哈希值。", "name": "sha1", "in": "path", "required": true } ], "responses": { "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/archive-compare-changed-files/{base_head}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "打包下载两次 ref 之间的变更文件。Download archive of changed files for a compare.", "operationId": "GetArchiveCompareChangedFiles", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "用于Git比较操作的基准和头部分支或提交的SHA值。格式:`base...head`", "name": "base_head", "in": "path", "required": true } ], "responses": { "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/archive/{ref_with_path}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ ], "tags": [ "Git" ], "summary": "下载仓库内容", "operationId": "GetArchive", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "包含路径的Git引用。格式:`分支名`,`标签名`,`提交哈希`,`分支名/文件路径`", "name": "ref_with_path", "in": "path", "required": true } ], "responses": { "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/blobs": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "创建一个 blob。Create a blob.", "operationId": "CreateBlob", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "description": "PostBlobForm", "name": "post_blob_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostBlobForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.Blob" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/git/branches": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询分支列表。List branches.", "operationId": "ListBranches", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "分页页码。", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "分页页大小。", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.Branch" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "创建新分支。Create a new branch based on a start point.", "operationId": "CreateBranch", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "description": "Create Branch Form", "name": "create_branch_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/openapi.CreateBranchForm" } } ], "responses": { "201": { "description": "Created" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/git/branches/{branch}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询指定分支。Get a branch.", "operationId": "GetBranch", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "分支名称。", "name": "branch", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.BranchDetail" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"}, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "删除指定分支。Delete the specified branch.", "operationId": "DeleteBranch", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "分支名称。", "name": "branch", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/git/commit-annotations-in-batch": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询指定 commit 的元数据。Get commit annotations in batch.", "operationId": "GetCommitAnnotationsInBatch", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "description": "Get Commit Annotations In Batch Form", "name": "get_commit_annotations_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/web.GetCommitAnnotationsInBatchForm" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/web.CommitAnnotationInBatch" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/commit-annotations/{sha}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询指定 commit 的元数据。Get commit annotations.", "operationId": "GetCommitAnnotations", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交的哈希值。", "name": "sha", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/web.CommitAnnotation" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "设定指定 commit 的元数据。Put commit annotations.", "operationId": "PutCommitAnnotations", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交的哈希值。", "name": "sha", "in": "path", "required": true }, { "description": "Put Commit Annotations Form", "name": "put_commit_annotations_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/openapi.PutCommitAnnotationsForm" } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/git/commit-annotations/{sha}/{key}": { "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "删除指定 commit 的元数据。Delete commit annotation.", "operationId": "DeleteCommitAnnotation", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交的哈希值。", "name": "sha", "in": "path", "required": true }, { "type": "string", "description": "提交的元数据键名。", "name": "key", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/git/commit-assets/{sha1}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询指定 commit 的附件。List commit assets.", "operationId": "GetCommitAssetsBySha", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交的哈希值。", "name": "sha1", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.CommitAsset" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/commit-assets/{sha1}/asset-upload-confirmation/{upload_token}/{asset_path}": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "确认 commit 附件上传完成。Confirm commit asset upload.", "operationId": "PostCommitAssetUploadConfirmation", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交的哈希值。", "name": "sha1", "in": "path", "required": true }, { "type": "string", "description": "PostCommitAssetUploadURL接口返回值verify_url字段提取的upload_token。", "name": "upload_token", "in": "path", "required": true }, { "type": "string", "description": "PostCommitAssetUploadURL接口返回值verify_url字段提取的asset_path。", "name": "asset_path", "in": "path", "required": true }, { "type": "integer", "format": "int64", "description": "附件保持的天数。0 表示永久,最大不能超过 180 天", "name": "ttl", "in": "query" } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/git/commit-assets/{sha1}/asset-upload-url": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "新增一个 commit 附件。Create a commit asset.", "operationId": "PostCommitAssetUploadURL", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交的哈希值。", "name": "sha1", "in": "path", "required": true }, { "description": "Post Commit Asset Upload URL Form", "name": "create_commit_asset_upload_url_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/openapi.PostCommitAssetUploadURLForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/openapi.CommitAssetUploadURL" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/git/commit-assets/{sha1}/{asset_id}": { "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "删除指定 commit 的附件。Delete commit asset.", "operationId": "DeleteCommitAsset", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交的哈希值。", "name": "sha1", "in": "path", "required": true }, { "type": "string", "description": "附件唯一标识符。", "name": "asset_id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/git/commit-statuses/{commitish}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询指定 commit 的提交状态。List commit check statuses.", "operationId": "GetCommitStatuses", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "Git引用标识符。格式:`分支名称`,`提交哈希值`,`标签名称`", "name": "commitish", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.CommitStatus" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/commits": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询 commit 列表。List commits.", "operationId": "ListCommits", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交标识符。格式:`分支名称`,`提交哈希值`", "name": "sha", "in": "query" }, { "type": "string", "description": "作者匹配模式,支持Git原生正则表达式匹配作者信息。", "name": "author", "in": "query" }, { "type": "string", "description": "提交者匹配模式,支持Git原生正则表达式匹配提交者信息。", "name": "committer", "in": "query" }, { "type": "string", "description": "提交时间起始范围。示例:`2025-01-01T00:00:00Z`", "name": "since", "in": "query" }, { "type": "string", "description": "提交时间结束范围。示例:`2025-12-31T23:59:59Z`", "name": "until", "in": "query" }, { "type": "integer", "default": 1, "description": "分页页码。", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "分页页大小。", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.Commit" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/commits/{ref}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询指定 commit。Get a commit.", "operationId": "GetCommit", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "提交的哈希值或分支名称。", "name": "ref", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Commit" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/compare/{base_head}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "比较两个提交、分支或标签之间差异的接口。Compare two commits, branches, or tags.", "operationId": "GetCompareCommits", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "用于Git比较操作的基准和头部分支或提交的SHA值。格式:`base...head`", "name": "base_head", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.CompareResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/contents": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json", "application/vnd.cnb.raw+json" ], "tags": [ "Git" ], "summary": "查询仓库文件和目录内容。List repository files and directories.", "operationId": "GetContentWithoutPath", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "ref", "name": "ref", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Content" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/contents/{file_path}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json", "application/vnd.cnb.raw+json" ], "tags": [ "Git" ], "summary": "查询仓库文件列表或文件。List repository files or file.", "operationId": "GetContent", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "path", "name": "file_path", "in": "path", "required": true }, { "type": "string", "description": "ref", "name": "ref", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Content" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/head": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "获取仓库默认分支。Get the default branch of the repository.", "operationId": "GetHead", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/openapi.HeadRef" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/raw/{ref_with_path}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ ], "tags": [ "Git" ], "summary": "获得仓库指定文件内容", "operationId": "GetRaw", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "ref with path", "name": "ref_with_path", "in": "path", "required": true }, { "type": "integer", "description": "max blob size limit", "name": "max_in_byte", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/git/tag-annotations/{tag_with_key}": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "删除指定 tag 的元数据。Delete the metadata of the specified tag.", "operationId": "DeleteTagAnnotation", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "tag with key", "name": "tag_with_key", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw"} }, "/{repo}/-/git/tag-annotations/{tag}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询指定 tag 的元数据。Query the metadata of the specified tag.", "operationId": "GetTagAnnotations", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "tag", "name": "tag", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/web.TagAnnotation" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "设定指定 tag 的元数据。Set the metadata of the specified tag.", "operationId": "PutTagAnnotations", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "tag", "name": "tag", "in": "path", "required": true }, { "description": "Put Tag Annotations Form", "name": "put_tag_annotations_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/openapi.PutTagAnnotationsForm" } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw"} }, "/{repo}/-/git/tags": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询 tag 列表。List tags.", "operationId": "ListTags", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.Tag" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "创建一个 tag。Create a tag.", "operationId": "CreateTag", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "description": "PostTagFrom", "name": "post_tag_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostTagFrom" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.Tag" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/git/tags/{tag}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "查询指定 tag。Get a tag.", "operationId": "GetTag", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "tag name", "name": "tag", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Tag" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r"}, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "删除指定 tag。Delete the specified tag.", "operationId": "DeleteTag", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "tag name", "name": "tag", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw"} }, "/{repo}/-/imgs/{imgPath}": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "删除 UploadImgs 上传的图片\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw", "tags": [ "Pulls", "Issues" ], "summary": "删除 UploadImgs 上传的图片", "operationId": "DeleteRepoImgs", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "图片访问链接的imgs后半部分,比如链接是 https://cnb.cool/cnb/feedback/-/imgs/abc/1234abcd.png,imgPath 就是 abc/1234abcd.png", "name": "imgPath", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } }, "/{repo}/-/inherit-members": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "获取指定仓库内的继承成员。List inherited members within specified repository。", "operationId": "ListInheritMembersOfRepo", "parameters": [ { "type": "string", "description": "slug", "name": "repo", "in": "path", "required": true }, { "type": "string", "default": "", "description": "过滤成员。Filter by member", "name": "search", "in": "query" }, { "enum": [ "Guest", "Reporter", "Developer", "Master", "Owner" ], "type": "string", "description": "Role", "name": "role", "in": "query" }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.ListInheritMembers" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"} }, "/{repo}/-/issues": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "查询仓库的 Issues。List issues.", "operationId": "ListIssues", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number. If the value is less than 1, it will automatically be adjusted to 1", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size. If the value is more than 100, it will automatically be adjusted to 100", "name": "page_size", "in": "query" }, { "type": "string", "description": "issue state open or closed", "name": "state", "in": "query" }, { "type": "string", "description": "issue search key", "name": "keyword", "in": "query" }, { "type": "string", "description": "issue priority example: -1P, -2P, P0, P1, P2, P3", "name": "priority", "in": "query" }, { "type": "string", "description": "issue labels example: git,bug,feature", "name": "labels", "in": "query" }, { "type": "string", "description": "issue labels operator example: contains_any,contains_all default: contains_any", "name": "labels_operator", "in": "query" }, { "type": "string", "description": "issue authors name, example: 张三,李四", "name": "authors", "in": "query" }, { "type": "string", "description": "issue assignees name, example: 张三,李四,-; - means assign to nobody", "name": "assignees", "in": "query" }, { "type": "string", "description": "issue filter update time begin example: 2022-01-31", "name": "updated_time_begin", "in": "query" }, { "type": "string", "description": "issue filter update time end, example: 2022-01-31", "name": "updated_time_end", "in": "query" }, { "type": "string", "description": "issue filter close time begin example: 2022-01-31", "name": "close_time_begin", "in": "query" }, { "type": "string", "description": "issue filter close time end, example: 2022-01-31", "name": "close_time_end", "in": "query" }, { "type": "string", "description": "issue order, example: created_at, -updated_at, reference_count。‘-’ prefix means descending order", "name": "order_by", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.Issue" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "创建一个 Issue。Create an issue.", "operationId": "CreateIssue", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "description": "Post Issue Form", "name": "post_issue_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostIssueForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.IssueDetail" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/issues/{number}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "查询指定的 Issues。Get an issue.", "operationId": "GetIssue", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "issue number", "name": "number", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.IssueDetail" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "patch": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "更新一个 Issue。Update an issue.", "operationId": "UpdateIssue", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "issue number", "name": "number", "in": "path", "required": true }, { "description": "Patch Issue Form", "name": "patch_issue_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PatchIssueForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.IssueDetail" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/issues/{number}/assignees": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "查询指定 issue 的处理人。 List repository issue assignees.", "operationId": "ListIssueAssignees", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "issue number", "name": "number", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "添加处理人到指定的 issue。 Adds up to assignees to a issue, Users already assigned to an issue are not replaced.", "operationId": "PostIssueAssignees", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "issue number", "name": "number", "in": "path", "required": true }, { "description": "Post Issue Assignees Form", "name": "post_issue_assignees_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostIssueAssigneesForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.IssueDetail" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"}, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "删除 issue 中的处理人。 Removes one or more assignees from an issue.", "operationId": "DeleteIssueAssignees", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "issue number", "name": "number", "in": "path", "required": true }, { "description": "Delete Issue Assignees Form", "name": "delete_issue_assignees_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.DeleteIssueAssigneesForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.IssueDetail" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"}, "patch": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "更新 issue 中的处理人。 Updates the assignees of an issue.", "operationId": "PatchIssueAssignees", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "issue number", "name": "number", "in": "path", "required": true }, { "description": "Patch Issue Assignees Form", "name": "patch_issue_assignees_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PatchIssueAssigneesForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.IssueDetail" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/issues/{number}/assignees/{assignee}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "检查用户是否可以被添加到 issue 的处理人中。 Checks if a user can be assigned to an issue.", "operationId": "CanUserBeAssignedToIssue", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "issue number", "name": "number", "in": "path", "required": true }, { "type": "string", "description": "assignee", "name": "assignee", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"} }, "/{repo}/-/issues/{number}/comments": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "查询仓库的 issue 评论列表。List repository issue comments.", "operationId": "ListIssueComments", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "issue number", "name": "number", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.IssueComment" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "创建一个 issue 评论。Create an issue comment.", "operationId": "PostIssueComment", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "number", "name": "number", "in": "path", "required": true }, { "description": "Post Issue Comment Form", "name": "post_issue_comment_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostIssueCommentForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.IssueComment" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/issues/{number}/comments/{comment_id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "获取指定 issue 评论。Get an issue comment.", "operationId": "GetIssueComment", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "string", "description": "comment_id", "name": "comment_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.IssueComment" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "patch": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "修改一个 issue 评论。Update an issue comment.", "operationId": "PatchIssueComment", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "integer", "description": "comment_id", "name": "comment_id", "in": "path", "required": true }, { "description": "Patch Issue Comment Form", "name": "patch_issue_comment_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PatchIssueCommentForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.IssueComment" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/issues/{number}/labels": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "查询 issue 的标签列表。List labels for an issue.", "operationId": "ListIssueLabels", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.Label" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "设置 issue 标签。 Set the new labels for an issue.", "operationId": "PutIssueLabels", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "number", "name": "number", "in": "path", "required": true }, { "description": "Put Issue Labels Form", "name": "put_issue_labels_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PutIssueLabelsForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Label" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "新增 issue 标签。Add labels to an issue.", "operationId": "PostIssueLabels", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "number", "name": "number", "in": "path", "required": true }, { "description": "Post Issue Labels Form", "name": "post_issue_labels_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostIssueLabelsForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Label" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"}, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "清空 issue 标签。Remove all labels from an issue.", "operationId": "DeleteIssueLabels", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "number", "name": "number", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/issues/{number}/labels/{name}": { "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "删除 issue 标签。Remove a label from an issue.", "operationId": "DeleteIssueLabel", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "string", "description": "label name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Label" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/issues/{number}/property": { "post": { "security": [ { "BearerAuth": [] } ], "description": "为指定Issue批量设置多个自定义属性的值,key 不存在则创建,存在则更新\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw", "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Issues" ], "summary": "批量设置Issue自定义属性值", "operationId": "CreateIssueProperties", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "issue number", "name": "number", "in": "path", "required": true }, { "description": "Issue Properties Form", "name": "issue_properties_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/openapi.IssuePropertiesForm" } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } } }, "/{repo}/-/knowledge/base": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "KnowledgeBase" ], "summary": "获取知识库信息", "operationId": "GetKnowledgeBaseInfo", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.KnowledgeBaseInfoRes" } }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"}, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "KnowledgeBase" ], "summary": "删除知识库", "operationId": "DeleteKnowledgeBase", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/knowledge/base/query": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "KnowledgeBase" ], "summary": "查询知识库,使用文档:https://docs.cnb.cool/zh/ai/knowledge-base.html", "operationId": "QueryKnowledgeBase", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "description": "查询内容", "name": "query", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.QueryKnowledgeBaseReq" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.QueryKnowledgeBaseRes" } } }, "400": { "description": "Bad Request" }, "500": { "description": "Internal Server Error" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/knowledge/embedding/models": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "KnowledgeBase" ], "summary": "获取当前支持的 Embedding 模型列表", "operationId": "GetModels", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.EmbeddingModel" } } }, "400": { "description": "Bad Request" }, "500": { "description": "Internal Server Error" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/labels": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "RepoLabels" ], "summary": "查询仓库的标签列表。List repository labels.", "operationId": "ListLabels", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size", "name": "page_size", "in": "query" }, { "type": "string", "description": "label search key", "name": "keyword", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.Label" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "RepoLabels" ], "summary": "创建一个 标签。Create a label.", "operationId": "PostLabel", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "description": "Post Label Form", "name": "post_label_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostLabelForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.Label" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/labels/{name}": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "RepoLabels" ], "summary": "删除指定的仓库标签。Delete the specified repository label.", "operationId": "DeleteLabel", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "label name", "name": "name", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"}, "patch": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "RepoLabels" ], "summary": "更新标签信息。Update label information.", "operationId": "PatchLabel", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "label name", "name": "name", "in": "path", "required": true }, { "description": "Patch Label Form", "name": "patch_label_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PatchLabelForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Label" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/members": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "获取指定仓库内的所有直接成员。List all direct members within specified repository.", "operationId": "ListMembersOfRepo", "parameters": [ { "type": "string", "description": "slug", "name": "repo", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "enum": [ "Guest", "Reporter", "Developer", "Master", "Owner" ], "type": "string", "description": "Role", "name": "role", "in": "query" }, { "type": "string", "default": "", "description": "过滤成员。Filter by member.", "name": "search", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.UsersWithAccessLevelInSlug" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"} }, "/{repo}/-/members/access-level": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "获取指定仓库内, 访问成员在当前层级内的权限信息。Get permission information for accessing members at current level.", "operationId": "GetMemberAccessLevelOfRepo", "parameters": [ { "type": "string", "description": "slug", "name": "repo", "in": "path", "required": true }, { "type": "boolean", "default": true, "description": "是否包含继承的权限。If inherited permissions are included.", "name": "include_inherit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.MemberAccessLevelInSlugUnion" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"} }, "/{repo}/-/members/{username}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "更新指定仓库内的直接成员权限信息。Update permission information for direct members in specified repository.", "operationId": "UpdateMembersOfRepo", "parameters": [ { "type": "string", "description": "slug", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true }, { "description": "member information", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMembersRequest" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "添加成员。Add members.", "operationId": "AddMembersOfRepo", "parameters": [ { "type": "string", "description": "slug", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true }, { "description": "member information", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMembersRequest" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"}, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "删除指定仓库的直接成员。Remove direct members from specified repository.", "operationId": "DeleteMembersOfRepo", "parameters": [ { "type": "string", "description": "slug", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"} }, "/{repo}/-/members/{username}/access-level": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "获取指定仓库内指定成员的权限信息, 结果按组织层级来展示, 包含上层组织的权限继承信息。Get specified member's permissions with organizational hierarchy.", "operationId": "ListMemberAccessLevelOfRepo", "parameters": [ { "type": "string", "description": "slug", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.MemberAccessLevel" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"} }, "/{repo}/-/pull-in-batch": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "根据 number 列表查询合并请求列表。List pull requests by numbers.", "operationId": "ListPullsByNumbers", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "description": "pull request numbers", "name": "n", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.PullRequestInfo" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:r"} }, "/{repo}/-/pulls": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "查询合并请求列表。List pull requests.", "operationId": "ListPulls", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size", "name": "page_size", "in": "query" }, { "type": "string", "default": "open", "description": "pull state `open`,`closed`, `all`", "name": "state", "in": "query" }, { "type": "string", "description": "pull authors name, example: 张三,李四", "name": "authors", "in": "query" }, { "type": "string", "description": "pull reviewers name, example: 张三,李四; - means nobody to review", "name": "reviewers", "in": "query" }, { "type": "string", "description": "pull assignees name, example: 张三,李四,-; - means assign to nobody", "name": "assignees", "in": "query" }, { "type": "string", "description": "pull labels example: git,bug,feature", "name": "labels", "in": "query" }, { "type": "string", "description": "pull labels operator example: contains_any,contains_all default: contains_any", "name": "labels_operator", "in": "query" }, { "type": "string", "description": "pull base ref, example: refs/heads/master", "name": "base_ref", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.PullRequest" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "新增一个合并请求。Create a pull request.", "operationId": "PostPull", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "description": "Post Pull Request Form", "name": "post_pull_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PullCreationForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.Pull" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:rw"} }, "/{repo}/-/pulls/{number}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "查询指定合并请求。Get a pull request.", "operationId": "GetPull", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "pull request number", "name": "number", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Pull" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:r"}, "patch": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "更新一个合并请求。Update a pull request.", "operationId": "PatchPull", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "Pull Request Number", "name": "number", "in": "path", "required": true }, { "description": "Update Pull Request Form", "name": "update_pull_request_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PatchPullRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Pull" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:rw"} }, "/{repo}/-/pulls/{number}/assignees": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "查询指定合并请求的处理人。List repository pull request assignees.", "operationId": "ListPullAssignees", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "pull request number", "name": "number", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "添加处理人到指定的合并请求。 Adds up to assignees to a pull request. Users already assigned to an issue are not replaced.", "operationId": "PostPullAssignees", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "description": "Post Pull Assignees Form", "name": "post_pull_assignees_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostPullAssigneesForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.Pull" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"}, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "删除合并请求中的处理人 Removes one or more assignees from a pull request.", "operationId": "DeletePullAssignees", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "description": "Delete Pull Assignees Form", "name": "delete_pull_assignees_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.DeletePullAssigneesForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Pull" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/pulls/{number}/assignees/{assignee}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "检查用户是否可以被添加到合并请求的处理人中。 Checks if a user can be assigned to a pull request.", "operationId": "CanUserBeAssignedToPull", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "string", "description": "assignee", "name": "assignee", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"} }, "/{repo}/-/pulls/{number}/comments": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "查询合并请求评论列表。List pull comments requests.", "operationId": "ListPullComments", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.PullRequestComment" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "新增一个合并请求评论。Create a pull comment.", "operationId": "PostPullComment", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "description": "Post Pull Request Comment Form", "name": "post_pull_comment_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PullCommentCreationForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.PullRequestComment" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/pulls/{number}/comments/{comment_id}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "获取一个合并请求评论。Get a pull comment.", "operationId": "GetPullComment", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "integer", "description": "comment_id", "name": "comment_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.PullRequestComment" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "patch": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "更新一个合并请求评论。Update a pull comment.", "operationId": "PatchPullComment", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "integer", "description": "comment_id", "name": "comment_id", "in": "path", "required": true }, { "description": "Patch Pull Comment Form", "name": "patch_pull_comment_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PatchPullCommentForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.PullRequestComment" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/pulls/{number}/commit-statuses": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "查询 Pull Request 的状态检查", "operationId": "ListPullCommitStatuses", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "pull number", "name": "number", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.CommitStatuses" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:r"} }, "/{repo}/-/pulls/{number}/commits": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "查询指定合并请求的提交列表。Lists the commits in a specified pull request.", "operationId": "ListPullCommits", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "pull request number", "name": "number", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.Commit" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"} }, "/{repo}/-/pulls/{number}/files": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "查询指定合并请求的文件列表。Lists the files in a specified pull request.", "operationId": "ListPullFiles", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "pull request number", "name": "number", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.PullFile" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"} }, "/{repo}/-/pulls/{number}/labels": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "查询指定合并请求的标签列表。List labels for a pull.", "operationId": "ListPullLabels", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.Label" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "设置合并请求标签。Set the new labels for a pull.", "operationId": "PutPullLabels", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "description": "Put Pull Labels Form", "name": "put_pull_labels_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PutPullLabelsForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Label" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "新增合并请求标签。Add labels to a pull.", "operationId": "PostPullLabels", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "description": "Post Pull Labels Form", "name": "post_pull_labels_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostPullLabelsForm" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Label" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"}, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "清空合并请求标签。Remove all labels from a pull.", "operationId": "DeletePullLabels", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/pulls/{number}/labels/{name}": { "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "删除合并请求标签。Remove a label from a pull.", "operationId": "DeletePullLabel", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "string", "description": "label name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Label" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/pulls/{number}/merge": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "合并一个合并请求。Merge a pull request.", "operationId": "MergePull", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "Pull Request Number", "name": "number", "in": "path", "required": true }, { "description": "Merge Pull Request Form", "name": "merge_pull_request_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.MergePullRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.MergePullResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:rw"} }, "/{repo}/-/pulls/{number}/reviews": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "查询特定合并请求的评审列表。List pull reviews.", "operationId": "ListPullReviews", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.PullReview" } } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/die.WebError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "新增一次合并请求评审。Create a pull review.", "operationId": "PostPullReview", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "number", "name": "number", "in": "path", "required": true }, { "description": "Post Pull Review Form", "name": "post_pull_review_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PullReviewCreationForm" } } ], "responses": { "201": { "description": "Created" }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/die.WebError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw"} }, "/{repo}/-/pulls/{number}/reviews/{review_id}/comments": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Pulls" ], "summary": "查询指定合并请求评审评论列表。List pull review comments.", "operationId": "ListPullReviewComments", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "pull request number", "name": "number", "in": "path", "required": true }, { "type": "integer", "description": "pull request review id", "name": "review_id", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.PullReviewComment" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r"} }, "/{repo}/-/releases": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Releases" ], "summary": "查询 release 列表。List releases.", "operationId": "ListReleases", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "分页页码", "name": "page", "in": "query" }, { "type": "integer", "default": 30, "description": "分页页大小", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.Release" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Releases" ], "summary": "新增一个 release。Create a release.", "operationId": "PostRelease", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "description": "Post Release Form, attachment is optional", "name": "create_release_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/openapi.PostReleaseForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.Release" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/releases/download/{tag}/{filename}": { "get": { "security": [ { "BearerAuth": [] } ], "tags": [ "Releases" ], "summary": "发起一个获取 release 附件的请求, 302到有一定效期的下载地址。Get a request to fetch a release assets and returns 302 redirect to the assets URL with specific valid time.", "operationId": "GetReleasesAsset", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "标签名称。示例:`v1.0.0`", "name": "tag", "in": "path", "required": true }, { "type": "string", "description": "文件名称。示例:`test.png`", "name": "filename", "in": "path", "required": true }, { "type": "boolean", "default": false, "description": "是否可以下载,true表示302的下载地址有效期12小时,最多下载10次。", "name": "share", "in": "query" } ], "responses": { "302": { "description": "Found" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r"} }, "/{repo}/-/releases/latest": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Releases" ], "summary": "查询最新的 release。Query the latest release.", "operationId": "GetLatestRelease", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Release" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/releases/tags/{tag}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Releases" ], "summary": "通过 tag 查询指定 release,包含附件信息。Get a release by tag, include assets information.", "operationId": "GetReleaseByTag", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "标签名称。", "name": "tag", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Release" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{repo}/-/releases/{release_id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Releases" ], "summary": "根据 id\t查询指定 release, 包含附件信息。Get a release by id, include assets information.", "operationId": "GetReleaseByID", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "版本唯一标识符。", "name": "release_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Release" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"}, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Releases" ], "summary": "删除指定的 release。Delete a release.", "operationId": "DeleteRelease", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "版本唯一标识符。", "name": "release_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"}, "patch": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Releases" ], "summary": "更新 release。Update a release.", "operationId": "PatchRelease", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "版本唯一标识符。", "name": "release_id", "in": "path", "required": true }, { "description": "patch release form", "name": "patch_release_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/openapi.PatchReleaseForm" } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/releases/{release_id}/asset-upload-confirmation/{upload_token}/{asset_path}": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Releases" ], "summary": "确认 release 附件上传完成。Confirm release asset upload.", "operationId": "PostReleaseAssetUploadConfirmation", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "版本唯一标识符。", "name": "release_id", "in": "path", "required": true }, { "type": "string", "description": "PostReleaseAssetUploadURL接口返回值verify_url字段提取的upload_token。", "name": "upload_token", "in": "path", "required": true }, { "type": "string", "description": "PostReleaseAssetUploadURL接口返回值verify_url字段提取的asset_path。", "name": "asset_path", "in": "path", "required": true }, { "type": "integer", "format": "int64", "description": "附件保持的天数。0 表示永久,最大不能超过 180 天", "name": "ttl", "in": "query" } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/releases/{release_id}/asset-upload-url": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Releases" ], "summary": "新增一个 release 附件。Create a release asset.", "operationId": "PostReleaseAssetUploadURL", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "版本唯一标识符。", "name": "release_id", "in": "path", "required": true }, { "description": "Post Release Asset Upload URL Form", "name": "create_release_asset_upload_url_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/openapi.PostReleaseAssetUploadURLForm" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/openapi.ReleaseAssetUploadURL" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/releases/{release_id}/assets/{asset_id}": { "get": { "security": [ { "BearerAuth": [] } ], "tags": [ "Releases" ], "summary": "查询指定的 release 附件 the specified release asset.", "operationId": "GetReleaseAsset", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "版本唯一标识符。", "name": "release_id", "in": "path", "required": true }, { "type": "string", "description": "附件唯一标识符。", "name": "asset_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.ReleaseAsset" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"}, "delete": { "security": [ { "BearerAuth": [] } ], "tags": [ "Releases" ], "summary": "删除指定的 release 附件 the specified release asset.", "operationId": "DeleteReleaseAsset", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "版本唯一标识符。", "name": "release_id", "in": "path", "required": true }, { "type": "string", "description": "附件唯一标识符。", "name": "asset_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw"} }, "/{repo}/-/security/overview": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Security" ], "summary": "查询仓库安全模块概览数据。Query the security overview data of a repository", "operationId": "GetRepoSecurityOverview", "parameters": [ { "type": "string", "description": "仓库名称", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "类型,多个类型用逗号分隔code_sensitive,code_vulnerability,code_issue,为空默认查询所有类型", "name": "types", "in": "query" }, { "type": "string", "description": "查询类型下开启或忽略的各风险类型概览数量,可选值:open,ignore,all,默认all", "name": "tab", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.RepoSecurityOverview" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-security:r"} }, "/{repo}/-/settings/branch-protections": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "GitSettings" ], "summary": "查询仓库保护分支规则列表。List branch protection rules.", "operationId": "ListBranchProtections", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.BranchProtection" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "GitSettings" ], "summary": "新增仓库保护分支规则。Create branch protection rule.", "operationId": "PostBranchProtection", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "description": "Branch Protection Form", "name": "branch_protection_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.BranchProtection" } } ], "responses": { "201": { "description": "Created" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"} }, "/{repo}/-/settings/branch-protections/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "GitSettings" ], "summary": "查询仓库保护分支规则。Get branch protection rule.", "operationId": "GetBranchProtection", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "保护分支规则唯一标识符。", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.BranchProtection" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"}, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "GitSettings" ], "summary": "删除仓库保护分支规则。 Delete branch protection rule.", "operationId": "DeleteBranchProtection", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "保护分支规则唯一标识符。", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"}, "patch": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "GitSettings" ], "summary": "更新仓库保护分支规则。Update branch protection rule.", "operationId": "PatchBranchProtection", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "保护分支规则唯一标识符。", "name": "id", "in": "path", "required": true }, { "description": "Branch Protection Form", "name": "branch_protection_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.BranchProtection" } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"} }, "/{repo}/-/settings/cloud-native-build": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ ], "tags": [ "GitSettings" ], "summary": "查询仓库云原生构建设置。List pipeline settings.", "operationId": "GetPipelineSettings", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.PipelineSettings" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "GitSettings" ], "summary": "更新仓库云原生构建设置。Update pipeline settings.", "operationId": "PutPipelineSettings", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "description": "Cloud Native Build Form", "name": "pipeline_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PipelineSettings" } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"} }, "/{repo}/-/settings/pull-request": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "GitSettings" ], "summary": "查询仓库合并请求设置。List pull request settings.", "operationId": "GetPullRequestSettings", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.PullRequestSettings" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "GitSettings" ], "summary": "更新仓库合并请求设置。Set pull request settings.", "operationId": "PutPullRequestSettings", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "description": "Pull Request Form", "name": "pull_request_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PullRequestSettings" } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"} }, "/{repo}/-/settings/push-limit": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "GitSettings" ], "summary": "查询仓库推送设置。List push limit settings.", "operationId": "GetPushLimitSettings", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.PushLimitSettings" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "GitSettings" ], "summary": "设置仓库推送设置。Set push limit settings.", "operationId": "PutPushLimitSettings", "parameters": [ { "type": "string", "description": "不带.git后缀的仓库名称。格式:`组织名称/仓库名称`", "name": "repo", "in": "path", "required": true }, { "description": "Push Limit Form", "name": "push_limit_form", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PushLimitSettings" } } ], "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"} }, "/{repo}/-/settings/set_visibility": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "改变仓库可见性。Update visibility of repository.", "operationId": "SetRepoVisibility", "parameters": [ { "type": "string", "description": "repo path", "name": "repo", "in": "path", "required": true }, { "enum": [ "Private", "Public", "Secret" ], "type": "string", "description": "仓库可见性", "name": "visibility", "in": "query", "required": true } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"} }, "/{repo}/-/top-activity-users": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Activities" ], "summary": "获取仓库 top 活跃用户。List the top active users", "operationId": "TopContributors", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "maximum": 10, "minimum": 1, "type": "integer", "default": 5, "description": "返回的用户个数", "name": "top", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.UsersResult" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-base-info:r"} }, "/{repo}/-/transfer": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "转移仓库。Transfer a repository.", "operationId": "TransferRepo", "parameters": [ { "type": "string", "description": "slug", "name": "repo", "in": "path", "required": true }, { "description": "request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.TransferSlugReq" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw,repo-code:rw"} }, "/{repo}/-/upload/files": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pulls", "Issues" ], "summary": "发起一个上传 files 的请求,返回上传文件的url,请使用 put 发起流式上传。Initiate a request to upload files,returns upload URL.Use PUT to initiate a stream upload.", "operationId": "UploadFiles", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "description": "UploadRequestParams", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UploadRequestParams" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.UploadAssetsResponse" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw"} }, "/{repo}/-/upload/imgs": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Pulls", "Issues" ], "summary": "发起一个上传 imgs 的请求,返回上传文件的url,请使用 put 发起流式上传。Initiate a request to upload images,returns upload URL.Use PUT to initiate a stream upload.", "operationId": "UploadImgs", "parameters": [ { "type": "string", "description": "repo", "name": "repo", "in": "path", "required": true }, { "description": "UploadRequestParams", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UploadRequestParams" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.UploadAssetsResponse" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw"} }, "/{repo}/-/workspace/detail/{sn}": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Workspace" ], "summary": "根据流水线sn查询云原生开发访问地址。Query cloud-native development access address by pipeline SN.", "operationId": "GetWorkspaceDetail", "parameters": [ { "type": "string", "description": "Repo path", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "SN", "name": "sn", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.WorkspaceDetailResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-detail:r"} }, "/{repo}/-/workspace/start": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Workspace" ], "summary": "启动云原生开发环境,已存在环境则直接打开,否则重新创建开发环境。Start cloud-native dev. Opens existing env or creates a new one.", "operationId": "StartWorkspace", "parameters": [ { "type": "string", "description": "仓库完整路径", "name": "repo", "in": "path", "required": true }, { "description": "StartWorkspace params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.StartWorkspaceReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.StartWorkspaceResult" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:rw"} }, "/{slug}/-/charge/special-amount": { "get": { "security": [ { "BearerAuth": [] } ], "description": "查看根组织的特权额度,需要根组织的 master 以上权限才可以查看\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r", "tags": [ "Charge" ], "summary": "查看特权额度", "operationId": "GetSpecialAmount", "parameters": [ { "type": "string", "description": "group slug", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.SpecialAmount" } } } } }, "/{slug}/-/contributor/trend": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ ], "tags": [ "RepoContributor" ], "summary": "查询仓库贡献者前 100 名的详细趋势数据。Query detailed trend data for top 100 contributors of the repository.", "operationId": "GetRepoContributorTrend", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true }, { "type": "integer", "default": 14, "description": "limit, 0~100", "name": "limit", "in": "query" }, { "type": "boolean", "default": false, "description": "exclude_external_users, true|false", "name": "exclude_external_users", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/web.RepoContribTrend" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{slug}/-/lfs/{oid}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Git" ], "summary": "获取 git lfs 文件下载链接", "operationId": "GetPresignedLFSDownloadLink", "parameters": [ { "type": "string", "description": "repo slug", "name": "slug", "in": "path", "required": true }, { "type": "string", "description": "lfs oid", "name": "oid", "in": "path", "required": true }, { "type": "string", "description": "download filename", "name": "name", "in": "query", "required": true } ], "responses": { "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/die.WebError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/die.WebError" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"} }, "/{slug}/-/list-assets": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Assets" ], "summary": "仓库的 asset 记录列表", "operationId": "ListAssets", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "第几页,从1开始", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "每页多少条数据", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.AssetRecords" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"} }, "/{slug}/-/list-members": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members" ], "summary": "获取指定仓库内的有效成员列表,包含继承成员。List active members in specified repository including inherited members.", "operationId": "ListAllMembers", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "enum": [ "Guest", "Reporter", "Developer", "Master", "Owner" ], "type": "string", "description": "Role", "name": "role", "in": "query" }, { "type": "string", "default": "", "description": "过滤成员。Filter by member", "name": "search", "in": "query" }, { "type": "string", "default": "", "description": "精准匹配用户名,多个用户名用逗号间隔。Exact username matching, multiple usernames separated by commas.", "name": "names", "in": "query" }, { "enum": [ "created_at", "stars", "follower" ], "type": "string", "default": "created_at", "description": "Order field", "name": "order_by", "in": "query" }, { "type": "boolean", "default": false, "description": "Ordering", "name": "desc", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.UsersWithAccessLevelInSlug" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"} }, "/{slug}/-/missions": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Missions" ], "summary": "查询组织下面用户有权限查看到的任务集。Query all missions that the user has permission to see under the specific organization.", "operationId": "GetGroupSubMissions", "parameters": [ { "type": "string", "description": "组织 slug", "name": "slug", "in": "path", "required": true }, { "type": "integer", "format": "int64", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "format": "int64", "default": 10, "description": "每页数量", "name": "page_size", "in": "query" }, { "enum": [ "private", "public" ], "type": "string", "description": "任务集类型", "name": "filter_type", "in": "query" }, { "enum": [ "created_at", "name" ], "type": "string", "description": "排序类型,默认created_at", "name": "order_by", "in": "query" }, { "type": "boolean", "default": false, "description": "排序顺序", "name": "desc", "in": "query" }, { "enum": [ "all", "sub", "grand" ], "type": "string", "description": "查全部/查询直接属于当前组织的仓库/查询子组织的仓库", "name": "descendant", "in": "query" }, { "type": "string", "description": "搜索关键字", "name": "search", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Missions4User" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Missions" ], "summary": "创建任务集。Create a mission.", "operationId": "CreateMission", "parameters": [ { "type": "string", "description": "Group slug", "name": "slug", "in": "path", "required": true }, { "description": "mission information", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateMissionReq" } } ], "responses": { "201": { "description": "Created" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:rw"} }, "/{slug}/-/outside-collaborators": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members", "Collaborators" ], "summary": "获取指定仓库内的外部贡献者。List external contributors in specified repository.", "operationId": "ListOutsideCollaborators", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "enum": [ "Guest", "Reporter", "Developer", "Master" ], "type": "string", "description": "Role", "name": "role", "in": "query" }, { "type": "string", "default": "", "description": "过滤成员。Filter by member.", "name": "search", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.OutsideCollaboratorInRepo" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r"} }, "/{slug}/-/outside-collaborators/{username}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members", "Collaborators" ], "summary": "更新指定仓库的外部贡献者权限信息。 Update permission information for external contributors in specified repository.", "operationId": "UpdateOutsideCollaborators", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true }, { "enum": [ "Guest", "Reporter", "Developer" ], "type": "string", "description": "Role", "name": "role", "in": "query", "required": true } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"}, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Members", "Collaborators" ], "summary": "删除指定仓库的外部贡献者。Removes external contributors from specified repository.", "operationId": "DeleteOutsideCollaborators", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true }, { "type": "string", "description": "username", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw"} }, "/{slug}/-/packages": { "get": { "security": [ { "BearerAuth": [] } ], "description": "制品首页\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r", "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Registries" ], "summary": "查询制品列表。 List all packages.", "operationId": "ListPackages", "parameters": [ { "type": "string", "description": "资源路径。Slug.", "name": "slug", "in": "path", "required": true }, { "enum": [ "all", "docker", "helm", "docker-model", "maven", "npm", "ohpm", "pypi", "nuget", "composer", "conan" ], "type": "string", "description": "制品类型。Type.", "name": "type", "in": "query", "required": true }, { "type": "integer", "default": 1, "description": "页码。Pagination page number.", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "页数。Pagination page size", "name": "page_size", "in": "query" }, { "enum": [ "pull_count", "last_push_at", "name_ascend", "name_descend" ], "type": "string", "description": "顺序类型。Ordering type", "name": "ordering", "in": "query" }, { "type": "string", "description": "关键字。Key word to search package name", "name": "name", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Package" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/die.WebError" } } } } }, "/{slug}/-/packages/{type}/{name}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "制品详情页\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r", "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Registries" ], "summary": "获取指定制品的详细信息。 Get the package detail.", "operationId": "GetPackage", "parameters": [ { "type": "string", "description": "资源路径。Slug.", "name": "slug", "in": "path", "required": true }, { "enum": [ "docker", "helm", "docker-model", "maven", "npm", "ohpm", "pypi", "nuget", "composer", "conan", "cargo" ], "type": "string", "description": "制品类型。Type", "name": "type", "in": "path", "required": true }, { "type": "string", "description": "制品名称。Name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.PackageDetail" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "制品详情页-删除制品\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package-delete:rw", "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Registries" ], "summary": "删除制品。 Delete the specific package.", "operationId": "DeletePackage", "parameters": [ { "type": "string", "description": "资源路径。 Slug.", "name": "slug", "in": "path", "required": true }, { "enum": [ "docker", "helm", "docker-model", "maven", "npm", "ohpm", "pypi", "nuget", "composer", "conan" ], "type": "string", "description": "制品类型。Type.", "name": "type", "in": "path", "required": true }, { "type": "string", "description": "制品名称。Package name.", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } }, "/{slug}/-/packages/{type}/{name}/-/tag/{tag}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "制品详情页-版本详情\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r", "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Registries" ], "summary": "获取制品标签详情。 Get the specific tag under specific package.", "operationId": "GetPackageTagDetail", "parameters": [ { "type": "string", "description": "Slug", "name": "slug", "in": "path", "required": true }, { "enum": [ "docker", "helm", "docker-model", "maven", "npm", "ohpm", "pypi", "nuget", "composer", "conan" ], "type": "string", "description": "Type", "name": "type", "in": "path", "required": true }, { "type": "string", "description": "Name", "name": "name", "in": "path", "required": true }, { "type": "string", "description": "Tag", "name": "tag", "in": "path", "required": true }, { "type": "string", "description": "摘要", "name": "sha256", "in": "query" }, { "type": "string", "description": "架构,docker制品必需,例: linux/amd64/v3。required for docker artifacts", "name": "arch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.TagDetail" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "制品详情页-版本详情-删除标签\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package-delete:rw", "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Registries" ], "summary": "删除制品标签。 Delete the specific tag under specific package", "operationId": "DeletePackageTag", "parameters": [ { "type": "string", "description": "Slug", "name": "slug", "in": "path", "required": true }, { "enum": [ "docker", "helm", "docker-model", "maven", "npm", "ohpm", "pypi", "nuget", "composer", "conan" ], "type": "string", "description": "Type", "name": "type", "in": "path", "required": true }, { "type": "string", "description": "Name", "name": "name", "in": "path", "required": true }, { "type": "string", "description": "Tag", "name": "tag", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } }, "/{slug}/-/packages/{type}/{name}/-/tags": { "get": { "security": [ { "BearerAuth": [] } ], "description": "制品详情页-版本列表\n访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r", "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Registries" ], "summary": "查询制品标签列表。 List all tags under specific package.", "operationId": "ListPackageTags", "parameters": [ { "type": "string", "description": "资源路径。Slug.", "name": "slug", "in": "path", "required": true }, { "enum": [ "docker", "helm", "docker-model", "maven", "npm", "ohpm", "pypi", "nuget", "composer", "conan" ], "type": "string", "description": "制品类型。Type.", "name": "type", "in": "path", "required": true }, { "type": "string", "description": "制品名称。Package name.", "name": "name", "in": "path", "required": true }, { "type": "integer", "default": 1, "description": "页码。Pagination page number.", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "页数。Pagination page size.", "name": "page_size", "in": "query" }, { "enum": [ "pull_count", "last_push_at" ], "type": "string", "description": "顺序。Ordering type.", "name": "ordering", "in": "query" }, { "type": "string", "description": "关键词。Key word.", "name": "name", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.Tag" } } } } }, "/{slug}/-/pinned-repos": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "获取指定组织的仓库墙列表。List the pinned repositories of a group.", "operationId": "GetPinnedRepoByGroup", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Repos4UserBase" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "更新指定组织仓库墙。Update the pinned repositories of a group.", "operationId": "SetPinnedRepoByGroup", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true }, { "description": "repo path", "name": "request", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Repos4UserBase" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw"} }, "/{slug}/-/registries": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Registries" ], "summary": "查询组织下面用户有权限查看到的制品仓库。Query all registries that the user has permission to see under specific organization.", "operationId": "GetGroupSubRegistries", "parameters": [ { "type": "string", "description": "组织 slug", "name": "slug", "in": "path", "required": true }, { "type": "integer", "format": "int64", "default": 1, "description": "页码", "name": "page", "in": "query" }, { "type": "integer", "format": "int64", "default": 10, "description": "每页数量", "name": "page_size", "in": "query" }, { "enum": [ "npm", "maven", "ohpm" ], "type": "string", "description": "制品仓库类型", "name": "registry_type", "in": "query" }, { "enum": [ "private", "public" ], "type": "string", "description": "制品仓库可见性类型", "name": "filter_type", "in": "query" }, { "enum": [ "created_at", "name" ], "type": "string", "description": "排序类型,默认created_at", "name": "order_by", "in": "query" }, { "type": "boolean", "default": false, "description": "排序顺序", "name": "desc", "in": "query" }, { "enum": [ "all", "sub", "grand" ], "type": "string", "description": "查全部/查询直接属于当前组织的仓库/查询子组织的制品仓库", "name": "descendant", "in": "query" }, { "type": "string", "description": "搜索关键字", "name": "search", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Registry4User" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r"} }, "/{slug}/-/repos": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "查询组织下访问用户有权限查看到仓库。List the repositories that the user has access to.", "operationId": "GetGroupSubRepos", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true }, { "type": "integer", "format": "int64", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "format": "int64", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" }, { "enum": [ "private", "public", "secret" ], "type": "string", "description": "Repositories type", "name": "filter_type", "in": "query" }, { "enum": [ "KnowledgeBase" ], "type": "string", "description": "仓库类型标记,逗号分隔。Repository type flags, comma separated", "name": "flags", "in": "query" }, { "enum": [ "active", "archived" ], "type": "string", "description": "仓库状态。Repository status", "name": "status", "in": "query" }, { "enum": [ "created_at", "last_updated_at", "stars", "slug_path", "forks" ], "type": "string", "default": "last_updated_at", "description": "Order field", "name": "order_by", "in": "query" }, { "type": "boolean", "default": false, "description": "Ordering", "name": "desc", "in": "query" }, { "enum": [ "all", "sub", "grand" ], "type": "string", "description": "查全部/查询直接属于当前组织的仓库/查询子组织的仓库。Get all/Get repos belong to current org or sub-organization", "name": "descendant", "in": "query" }, { "type": "string", "description": "Key word", "name": "search", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.Repos4User" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r"}, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "创建仓库。Create repositories.", "operationId": "CreateRepo", "parameters": [ { "type": "string", "description": "Group slug", "name": "slug", "in": "path", "required": true }, { "description": "repo information", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateRepoReq" } } ], "responses": { "201": { "description": "Created" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:rw"} }, "/{slug}/-/settings": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "获取指定组织的配置详情。Get the configuration details for the specified organization.", "operationId": "GetGroupSetting", "parameters": [ { "type": "string", "description": "group path", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.OrganizationSettingWithParent" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r"}, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "更新指定组织的配置。Updates the configuration for the specified organization.", "operationId": "UpdateGroupSetting", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true }, { "description": "group information to update", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.GroupSettingReq" } } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw"} }, "/{slug}/-/settings/archive": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "仓库归档。Archive a repository.", "operationId": "ArchiveRepo", "parameters": [ { "type": "string", "description": "repo path", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw,repo-code:rw"} }, "/{slug}/-/settings/unarchive": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Repositories" ], "summary": "解除仓库归档。Unarchive a repository.", "operationId": "UnArchiveRepo", "parameters": [ { "type": "string", "description": "repo path", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw,repo-code:rw"} }, "/{slug}/-/stars": { "get": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Starring" ], "summary": "获取指定仓库的star用户列表。Get the list of users who starred the specified repository.", "operationId": "ListStarUsers", "parameters": [ { "type": "string", "description": "slug", "name": "slug", "in": "path", "required": true }, { "enum": [ "all", "followed" ], "type": "string", "description": "Filter type", "name": "filter_type", "in": "query", "required": true }, { "type": "integer", "default": 1, "description": "page", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "page", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.RepoStarUsers" } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-basic-info:r"} }, "/{slug}/-/sub-groups": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/vnd.cnb.api+json" ], "tags": [ "Organizations" ], "summary": "获取指定组织下的子组织列表。Get the list of sub-organizations under the specified organization.", "operationId": "ListSubgroups", "parameters": [ { "type": "string", "description": "Slug", "name": "slug", "in": "path", "required": true }, { "type": "string", "default": "", "description": "Filter organization", "name": "search", "in": "query" }, { "type": "integer", "default": 1, "description": "Pagination page number", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Pagination page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.OrganizationUnion" } } } } ,"description":"访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r"} } }, "definitions": { "api.Blob": { "type": "object", "properties": { "sha": { "description": "提交的哈希值。", "type": "string" } } }, "api.Branch": { "type": "object", "properties": { "commit": { "description": "分支指向的最新提交信息。", "type": "object", "properties": { "sha": { "description": "最新提交的哈希值。", "type": "string" } } }, "name": { "description": "分支名称。", "type": "string" }, "protected": { "description": "分支是否是保护分支。", "type": "boolean" } } }, "api.BranchDetail": { "type": "object", "properties": { "commit": { "description": "分支指向的最新提交信息。", "allOf": [ { "$ref": "#/definitions/api.Commit" } ] }, "name": { "description": "分支名称。", "type": "string" }, "protected": { "description": "分支是否是保护分支。", "type": "boolean" } } }, "api.BranchProtection": { "type": "object", "properties": { "allow_creation": { "description": "是否允许所有人创建保护分支。", "type": "boolean" }, "allow_deletions": { "description": "是否允许所有人删除保护分支。", "type": "boolean" }, "allow_force_pushes": { "description": "是否允许所有人强制推送。", "type": "boolean" }, "allow_master_creation": { "description": "是否仅允许仓库管理员及负责人创建保护分支。", "type": "boolean" }, "allow_master_deletions": { "description": "是否仅允许仓库管理员及负责人删除保护分支。", "type": "boolean" }, "allow_master_force_pushes": { "description": "是否仅允许仓库管理员及负责人强制推送。", "type": "boolean" }, "allow_master_manual_merge": { "description": "是否允许仓库管理员及负责人手动合并到目标分支。", "type": "boolean" }, "allow_master_pushes": { "description": "是否仅允许仓库管理员及负责人推送代码到保护分支中。", "type": "boolean" }, "allow_pushes": { "description": "是否允许所有人推送代码到保护分支中。", "type": "boolean" }, "id": { "description": "保护分支规则唯一标识符。", "type": "string" }, "required_approved_review_count": { "description": "需要的代码评审者数量。格式:`评审者数量 ∈ [1,5]`", "type": "integer" }, "required_approved_review_ratio": { "description": "需要的评审通过率。格式:`通过率 ∈ [1, 100]`", "type": "integer" }, "required_linear_history": { "description": "是否仅允许线性提交。", "type": "boolean" }, "required_master_approve": { "description": "是否需至少一个仓库管理员批准。", "type": "boolean" }, "required_must_auto_merge": { "description": "是否仅允许自动合并。", "type": "boolean" }, "required_must_push_via_pull_request": { "description": "是否必须通过合并请求推送代码到此规则匹配分支中。", "type": "boolean" }, "required_pull_request_reviews": { "description": "保护分支的合并请求是否需要代码评审。", "type": "boolean" }, "required_status_checks": { "description": "是否需要通过状态检查。", "type": "boolean" }, "rule": { "description": "保护分支规则名称,支持通配符。", "type": "string" } } }, "api.Commit": { "type": "object", "properties": { "author": { "description": "提交的作者信息。", "allOf": [ { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" } ] }, "commit": { "description": "提交的详细信息。", "allOf": [ { "$ref": "#/definitions/api.CommitObject" } ] }, "committer": { "description": "提交的提交者信息。", "allOf": [ { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" } ] }, "parents": { "description": "父提交列表。", "type": "array", "items": { "$ref": "#/definitions/api.CommitParent" } }, "sha": { "description": "提交的哈希值。", "type": "string" } } }, "api.CommitAsset": { "type": "object", "properties": { "author": { "description": "提交附件作者信息。", "allOf": [ { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" } ] }, "content_type": { "description": "附件内容类型。", "type": "string" }, "created_at": { "description": "附件创建时间。", "type": "string" }, "download_count": { "description": "下载次数。", "type": "integer" }, "id": { "description": "附件唯一标识符。", "type": "string" }, "name": { "description": "附件名称。", "type": "string" }, "path": { "description": "附件路径。", "type": "string" }, "size_in_byte": { "description": "附件大小(字节)。", "type": "integer" }, "updated_at": { "description": "附件更新时间。", "type": "string" } } }, "api.CommitDiffFilePatch": { "type": "object", "properties": { "additions": { "description": "新增行数。", "type": "integer" }, "deletions": { "description": "删除行数。", "type": "integer" }, "mode": { "description": "文件权限模式。", "type": "string" }, "name": { "description": "文件名。", "type": "string" }, "patch": { "description": "Git差异补丁内容", "type": "string" }, "path": { "description": "文件路径。", "type": "string" }, "previous_filename": { "description": "重命名前的原文件名。", "type": "string" }, "previous_mode": { "description": "重命名前的文件权限模式。", "type": "string" }, "status": { "description": "文件变更状态。枚举值:`added`,`modified`,`deleted`,`renamed`,`copied`", "type": "string" } } }, "api.CommitObject": { "type": "object", "properties": { "author": { "description": "提交的作者签名信息。", "allOf": [ { "$ref": "#/definitions/api.Signature" } ] }, "comment_count": { "description": "提交的评论数量。", "type": "integer" }, "committer": { "description": "提交的提交者签名信息。", "allOf": [ { "$ref": "#/definitions/api.Signature" } ] }, "message": { "description": "提交的消息内容。", "type": "string" }, "tree": { "description": "提交对应的树对象信息。", "allOf": [ { "$ref": "#/definitions/api.CommitObjectTree" } ] }, "verification": { "description": "提交的验证信息。", "allOf": [ { "$ref": "#/definitions/api.CommitObjectVerification" } ] } } }, "api.CommitObjectTree": { "type": "object", "properties": { "sha": { "description": "树对象的哈希值。", "type": "string" } } }, "api.CommitObjectVerification": { "type": "object", "properties": { "payload": { "description": "验证负载数据。", "type": "string" }, "reason": { "description": "验证结果的原因。", "type": "string" }, "signature": { "description": "签名信息。", "type": "string" }, "verified": { "description": "提交是否已验证。", "type": "boolean" }, "verified_at": { "description": "验证时间。", "type": "string" } } }, "api.CommitParent": { "type": "object", "properties": { "sha": { "description": "父提交的哈希值。", "type": "string" } } }, "api.CommitStatuses": { "type": "object", "properties": { "sha": { "type": "string" }, "state": { "type": "string" }, "statuses": { "type": "array", "items": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.CommitStatus" } } } }, "api.CompareResponse": { "type": "object", "properties": { "base_commit": { "description": "基准对比提交。", "allOf": [ { "$ref": "#/definitions/api.Commit" } ] }, "commits": { "description": "提交列表。", "type": "array", "items": { "$ref": "#/definitions/api.Commit" } }, "files": { "description": "文件差异列表。", "type": "array", "items": { "$ref": "#/definitions/api.CommitDiffFilePatch" } }, "head_commit": { "description": "源分支最新提交。", "allOf": [ { "$ref": "#/definitions/api.Commit" } ] }, "merge_base_commit": { "description": "共同祖先提交。", "allOf": [ { "$ref": "#/definitions/api.Commit" } ] }, "total_commits": { "description": "总提交数。", "type": "integer" } } }, "api.Content": { "type": "object", "properties": { "content": { "type": "string" }, "encoding": { "type": "string" }, "entries": { "type": "array", "items": { "$ref": "#/definitions/api.TreeEntry" } }, "lfs_download_url": { "type": "string" }, "lfs_oid": { "type": "string" }, "lfs_size": { "type": "integer" }, "name": { "type": "string" }, "path": { "type": "string" }, "sha": { "type": "string" }, "size": { "type": "integer" }, "type": { "type": "string" } } }, "api.DeleteIssueAssigneesForm": { "type": "object", "properties": { "assignees": { "type": "array", "items": { "type": "string" } } } }, "api.DeletePullAssigneesForm": { "type": "object", "properties": { "assignees": { "type": "array", "items": { "type": "string" } } } }, "api.DiffLine": { "type": "object", "properties": { "content": { "type": "string" }, "left_line_number": { "type": "integer" }, "prefix": { "type": "string" }, "right_line_number": { "type": "integer" }, "type": { "type": "string" } } }, "api.GPGEmail": { "type": "object", "properties": { "email": { "description": "邮箱", "type": "string" }, "verified": { "description": "是否已验证", "type": "boolean" } } }, "api.GPGPublicKey": { "type": "object", "properties": { "created_at": { "description": "主密钥添加时间", "type": "string" }, "emails": { "description": "邮箱", "type": "array", "items": { "$ref": "#/definitions/api.GPGEmail" } }, "expired_at": { "description": "主密钥过期时间", "type": "string" }, "id": { "description": "主密钥ID", "type": "string" }, "key_id": { "description": "公钥 KeyID", "type": "string" }, "name": { "description": "标题", "type": "string" }, "raw_key": { "description": "PGP公钥文本", "type": "string" }, "subkeys": { "description": "子密钥", "type": "array", "items": { "$ref": "#/definitions/api.GPGSubkey" } } } }, "api.GPGSubkey": { "type": "object", "properties": { "created_at": { "description": "子密钥添加时间", "type": "string" }, "expired_at": { "description": "子密钥过期时间", "type": "string" }, "id": { "description": "子密钥ID", "type": "string" }, "key_id": { "description": "子密钥 KeyID", "type": "string" }, "primary_key_id": { "description": "主密钥 ID", "type": "string" } } }, "api.Issue": { "type": "object", "properties": { "assignees": { "type": "array", "items": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo" } }, "author": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo" }, "comment_count": { "type": "integer" }, "created_at": { "type": "string" }, "ended_at": { "type": "string" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/api.Label" } }, "last_acted_at": { "type": "string" }, "number": { "type": "string" }, "priority": { "type": "string" }, "started_at": { "type": "string" }, "state": { "type": "string" }, "state_reason": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string" } } }, "api.IssueComment": { "type": "object", "properties": { "author": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo" }, "body": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "string" }, "updated_at": { "type": "string" } } }, "api.IssueDetail": { "type": "object", "properties": { "assignees": { "type": "array", "items": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo" } }, "author": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo" }, "body": { "type": "string" }, "comment_count": { "type": "integer" }, "created_at": { "type": "string" }, "ended_at": { "type": "string" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/api.Label" } }, "last_acted_at": { "type": "string" }, "number": { "type": "string" }, "priority": { "type": "string" }, "started_at": { "type": "string" }, "state": { "type": "string" }, "state_reason": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string" } } }, "api.Label": { "type": "object", "properties": { "color": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" } } }, "api.MergePullRequest": { "type": "object", "properties": { "commit_message": { "type": "string" }, "commit_title": { "type": "string" }, "merge_style": { "description": "The merge method to use. Can be one of: `merge`, `squash`, `rebase`", "type": "string" } } }, "api.MergePullResponse": { "type": "object", "properties": { "merged": { "type": "boolean" }, "message": { "type": "string" }, "sha": { "type": "string" } } }, "api.PatchIssueAssigneesForm": { "type": "object", "properties": { "assignees": { "type": "array", "items": { "type": "string" } } } }, "api.PatchIssueCommentForm": { "type": "object", "properties": { "body": { "type": "string" } } }, "api.PatchIssueForm": { "type": "object", "properties": { "body": { "type": "string" }, "end_date": { "description": "end time", "type": "string" }, "priority": { "description": "Priority of this issue. Can be one of: `-1P`, `-2P`, `P0`, `P1`, `P2`, `P3`, `\"\"`.", "type": "string" }, "start_date": { "description": "start time", "type": "string" }, "state": { "description": "State of this issue. Either `open` or `closed`.", "type": "string" }, "state_reason": { "description": "StateReason can be one of: `completed`, `not_planned`, `reopened`", "type": "string" }, "title": { "type": "string" } } }, "api.PatchLabelForm": { "type": "object", "properties": { "color": { "description": "The hexadecimal color code for the label, without the leading `#`.", "type": "string" }, "description": { "type": "string" }, "new_name": { "type": "string" } } }, "api.PatchPullCommentForm": { "type": "object", "properties": { "body": { "type": "string" } } }, "api.PatchPullRequest": { "type": "object", "properties": { "body": { "type": "string" }, "state": { "description": "State of this Pull Request. Either `open` or `closed`.", "type": "string" }, "title": { "type": "string" } } }, "api.PipelineSettings": { "type": "object", "properties": { "auto_trigger": { "description": "是否允许仓库按照.cnb.yml配置自动触发云原生构建。", "type": "boolean" }, "forked_repo_auto_trigger": { "description": "是否允许本仓Fork出来的仓库按照.cnb.yml配置自动触发云原生构建。", "type": "boolean" } } }, "api.PostBlobForm": { "type": "object", "properties": { "content": { "description": "Blob的内容。", "type": "string" }, "encoding": { "description": "内容的编码格式。可选值:`utf-8`,`base64`", "type": "string", "default": "utf-8" } } }, "api.PostIssueAssigneesForm": { "type": "object", "properties": { "assignees": { "type": "array", "items": { "type": "string" } } } }, "api.PostIssueCommentForm": { "type": "object", "properties": { "body": { "type": "string" } } }, "api.PostIssueForm": { "type": "object", "properties": { "assignees": { "type": "array", "items": { "type": "string" } }, "body": { "type": "string" }, "end_date": { "type": "string" }, "invisible": { "description": "是否可见", "type": "boolean" }, "labels": { "type": "array", "items": { "type": "string" } }, "priority": { "description": "Priority of this issue. Can be one of: `-1P`, `-2P`, `P0`, `P1`, `P2`, `P3`, `\"\"`.", "type": "string" }, "start_date": { "type": "string" }, "title": { "type": "string" } } }, "api.PostIssueLabelsForm": { "type": "object", "properties": { "labels": { "type": "array", "items": { "type": "string" } } } }, "api.PostLabelForm": { "type": "object", "properties": { "color": { "description": "The hexadecimal color code for the label, without the leading `#`.", "type": "string" }, "description": { "type": "string" }, "name": { "type": "string" } } }, "api.PostPullAssigneesForm": { "type": "object", "properties": { "assignees": { "type": "array", "items": { "type": "string" } } } }, "api.PostPullLabelsForm": { "type": "object", "properties": { "labels": { "type": "array", "items": { "type": "string" } } } }, "api.PostTagFrom": { "type": "object", "properties": { "message": { "type": "string" }, "name": { "type": "string" }, "target": { "type": "string" } } }, "api.Pull": { "type": "object", "properties": { "base": { "$ref": "#/definitions/api.PullRef" }, "blocked_on": { "type": "string" }, "body": { "type": "string" }, "head": { "$ref": "#/definitions/api.PullRef" }, "is_wip": { "type": "boolean" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/api.Label" } }, "merged_by": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" }, "number": { "type": "string" }, "reviewers": { "type": "array", "items": { "$ref": "#/definitions/api.PullReviewer" } }, "state": { "type": "string" }, "title": { "type": "string" } } }, "api.PullCommentCreationForm": { "type": "object", "properties": { "body": { "type": "string" } } }, "api.PullCreationForm": { "type": "object", "properties": { "base": { "type": "string" }, "body": { "type": "string" }, "head": { "type": "string" }, "head_repo": { "type": "string" }, "title": { "type": "string" } } }, "api.PullFile": { "type": "object", "properties": { "additions": { "type": "integer" }, "blob_url": { "type": "string" }, "contents_url": { "type": "string" }, "deletions": { "type": "integer" }, "filename": { "type": "string" }, "patch": { "type": "string" }, "raw_url": { "type": "string" }, "sha": { "type": "string" }, "status": { "description": "Status of this Pull Request specified diff file. Either `add` / `modify` / `delete` / `rename` / `copy`.", "type": "string" } } }, "api.PullRef": { "type": "object", "properties": { "ref": { "type": "string" }, "repo": { "$ref": "#/definitions/api.Repo" }, "sha": { "type": "string" } } }, "api.PullRefInfo": { "type": "object", "properties": { "ref": { "type": "string" }, "repo": { "$ref": "#/definitions/api.RepoInfo" }, "sha": { "type": "string" } } }, "api.PullRequest": { "type": "object", "properties": { "assignees": { "type": "array", "items": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" } }, "author": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" }, "base": { "$ref": "#/definitions/api.PullRef" }, "blocked_on": { "type": "string" }, "comment_count": { "type": "integer" }, "created_at": { "type": "string" }, "head": { "$ref": "#/definitions/api.PullRef" }, "is_wip": { "type": "boolean" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/api.Label" } }, "last_acted_at": { "type": "string" }, "mergeable_state": { "type": "string" }, "merged_by": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" }, "number": { "type": "string" }, "repo": { "$ref": "#/definitions/api.Repo" }, "review_count": { "type": "integer" }, "state": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string" } } }, "api.PullRequestComment": { "type": "object", "properties": { "author": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" }, "body": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "string" }, "updated_at": { "type": "string" } } }, "api.PullRequestInfo": { "type": "object", "properties": { "assignees": { "type": "array", "items": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo" } }, "author": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo" }, "base": { "$ref": "#/definitions/api.PullRefInfo" }, "blocked_on": { "type": "string" }, "created_at": { "type": "string" }, "head": { "$ref": "#/definitions/api.PullRefInfo" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/api.Label" } }, "last_acted_at": { "type": "string" }, "mergeable_state": { "type": "string" }, "merged_by": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo" }, "number": { "type": "string" }, "repo": { "$ref": "#/definitions/api.RepoInfo" }, "reviewers": { "type": "array", "items": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo" } }, "state": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string" } } }, "api.PullRequestSettings": { "type": "object", "properties": { "allow_merge_commit_merge": { "description": "是否允许直接提交合并。", "type": "boolean" }, "allow_rebase_merge": { "description": "是否允许变基合并。", "type": "boolean" }, "allow_squash_merge": { "description": "是否允许压缩合并。", "type": "boolean" }, "master_auto_as_reviewer": { "description": "是否允许自动添加仓库管理员为评审者。", "type": "boolean" }, "merge_commit_message_style": { "description": "直接提交合并操作时默认生成的提交信息内容。可选值:`default`,`pull_request_title`,`pull_request_title_with_body`", "type": "string" }, "squash_commit_message_style": { "description": "压缩合并操作时默认生成的提交信息内容。可选值:`default`,`pull_request_title`,`pull_request_title_with_body`", "type": "string" } } }, "api.PullReview": { "type": "object", "properties": { "author": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" }, "body": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "string" }, "state": { "type": "string" }, "updated_at": { "type": "string" } } }, "api.PullReviewComment": { "type": "object", "properties": { "author": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" }, "body": { "type": "string" }, "commit_hash": { "type": "string" }, "created_at": { "type": "string" }, "diff_hunk": { "type": "array", "items": { "$ref": "#/definitions/api.DiffLine" } }, "end_line": { "type": "integer" }, "end_side": { "type": "string" }, "id": { "type": "string" }, "path": { "type": "string" }, "reply_to_comment_id": { "type": "string" }, "review_id": { "type": "string" }, "review_state": { "type": "string" }, "start_line": { "type": "integer" }, "start_side": { "type": "string" }, "subject_type": { "type": "string" }, "updated_at": { "type": "string" } } }, "api.PullReviewCommentCreationForm": { "type": "object", "properties": { "body": { "type": "string" }, "end_line": { "type": "integer" }, "end_side": { "type": "string" }, "path": { "type": "string" }, "start_line": { "type": "integer" }, "start_side": { "type": "string" }, "subject_type": { "description": "can be one of: line, file", "type": "string" } } }, "api.PullReviewCreationForm": { "type": "object", "properties": { "body": { "type": "string" }, "comments": { "type": "array", "items": { "$ref": "#/definitions/api.PullReviewCommentCreationForm" } }, "event": { "type": "string" } } }, "api.PullReviewer": { "type": "object", "properties": { "review_state": { "description": "reviewState contains One of: `pending`, `commented`, `approved`, `changes_requested`, `dismissed`.", "type": "string" }, "user": { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" } } }, "api.PushLimitSettings": { "type": "object", "properties": { "allow_single_push_number": { "description": "允许单次推送最多允许更新分支和标签的个数数量。", "type": "integer" }, "check_single_push_number": { "description": "是否开启单次更新分支和标签的个数限制。", "type": "boolean" }, "only_master_can_push_tag": { "description": "是否仅允许负责人和管理员推送或删除标签、创建或删除版本。", "type": "boolean" }, "push_commit_must_be": { "description": "推送提交到仓库,对提交作者和提交人进行检查。可选值:`any`,`registered`,`pusher`", "type": "string" } } }, "api.PutIssueLabelsForm": { "type": "object", "properties": { "labels": { "type": "array", "items": { "type": "string" } } } }, "api.PutPullLabelsForm": { "type": "object", "properties": { "labels": { "type": "array", "items": { "type": "string" } } } }, "api.Release": { "type": "object", "properties": { "assets": { "description": "附件列表。", "type": "array", "items": { "$ref": "#/definitions/api.ReleaseAsset" } }, "author": { "description": "作者信息。", "allOf": [ { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" } ] }, "body": { "description": "版本描述。", "type": "string" }, "created_at": { "description": "创建时间。", "type": "string" }, "draft": { "description": "是否为草稿版本。", "type": "boolean" }, "id": { "description": "版本唯一标识符。", "type": "string" }, "is_latest": { "description": "是否为最新版本。", "type": "boolean" }, "name": { "description": "版本标题。", "type": "string" }, "prerelease": { "description": "是否为预发布版本。", "type": "boolean" }, "published_at": { "description": "版本发布时间。", "type": "string" }, "tag_commitish": { "description": "标签与提交标识符。", "type": "string" }, "tag_name": { "description": "标签名称。", "type": "string" }, "updated_at": { "description": "更新时间。", "type": "string" } } }, "api.ReleaseAsset": { "type": "object", "properties": { "brower_download_url": { "description": "浏览器下载URL(通过主域名,用于用户直接访问)。", "type": "string" }, "content_type": { "description": "附件内容类型。", "type": "string" }, "created_at": { "description": "创建时间。", "type": "string" }, "download_count": { "description": "下载次数。", "type": "integer" }, "id": { "description": "附件唯一标识符。", "type": "string" }, "name": { "description": "附件名称。", "type": "string" }, "path": { "description": "附件路径。", "type": "string" }, "size": { "description": "附件大小(字节)。", "type": "integer" }, "updated_at": { "description": "更新时间。", "type": "string" }, "uploader": { "description": "附件上传者信息。", "allOf": [ { "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo" } ] }, "url": { "description": "API下载URL(通过API域名,用于程序化下载)。", "type": "string" } } }, "api.Repo": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" }, "web_url": { "type": "string" } } }, "api.RepoInfo": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" }, "web_url": { "type": "string" } } }, "api.Signature": { "type": "object", "properties": { "date": { "description": "签名时间。", "type": "string" }, "email": { "description": "签名者邮箱。", "type": "string" }, "name": { "description": "签名者姓名。", "type": "string" } } }, "api.Tag": { "type": "object", "properties": { "commit": { "$ref": "#/definitions/api.Commit" }, "name": { "type": "string" }, "target": { "type": "string" }, "target_type": { "type": "string" }, "verification": { "$ref": "#/definitions/api.TagObjectVerification" } } }, "api.TagObjectVerification": { "type": "object", "properties": { "payload": { "type": "string" }, "reason": { "type": "string" }, "signature": { "type": "string" }, "verified": { "type": "boolean" }, "verified_at": { "type": "string" } } }, "api.TreeEntry": { "type": "object", "properties": { "name": { "type": "string" }, "path": { "type": "string" }, "sha": { "type": "string" }, "type": { "type": "string" } } }, "chart.Dependency": { "type": "object", "properties": { "alias": { "description": "Alias usable alias to be used for the chart", "type": "string" }, "condition": { "description": "A yaml path that resolves to a boolean, used for enabling/disabling charts (e.g. subchart1.enabled )", "type": "string" }, "enabled": { "description": "Enabled bool determines if chart should be loaded", "type": "boolean" }, "import-values": { "description": "ImportValues holds the mapping of source values to parent key to be imported. Each item can be a\nstring or pair of child/parent sublist items.", "type": "array", "items": {} }, "name": { "description": "Name is the name of the dependency.\n\nThis must mach the name in the dependency's Chart.yaml.", "type": "string" }, "repository": { "description": "The URL to the repository.\n\nAppending `index.yaml` to this string should result in a URL that can be\nused to fetch the repository index.", "type": "string" }, "tags": { "description": "Tags can be used to group charts for enabling/disabling together", "type": "array", "items": { "type": "string" } }, "version": { "description": "Version is the version (range) of this chart.\n\nA lock file will always produce a single version, while a dependency\nmay contain a semantic version range.", "type": "string" } } }, "chart.Maintainer": { "type": "object", "properties": { "email": { "description": "Email is an optional email address to contact the named maintainer", "type": "string" }, "name": { "description": "Name is a user name or organization name", "type": "string" }, "url": { "description": "URL is an optional URL to an address for the named maintainer", "type": "string" } } }, "chart.Metadata": { "type": "object", "properties": { "annotations": { "description": "Annotations are additional mappings uninterpreted by Helm,\nmade available for inspection by other applications.", "type": "object", "additionalProperties": { "type": "string" } }, "apiVersion": { "description": "The API Version of this chart. Required.", "type": "string" }, "appVersion": { "description": "The version of the application enclosed inside of this chart.", "type": "string" }, "condition": { "description": "The condition to check to enable chart", "type": "string" }, "dependencies": { "description": "Dependencies are a list of dependencies for a chart.", "type": "array", "items": { "$ref": "#/definitions/chart.Dependency" } }, "deprecated": { "description": "Whether or not this chart is deprecated", "type": "boolean" }, "description": { "description": "A one-sentence description of the chart", "type": "string" }, "home": { "description": "The URL to a relevant project page, git repo, or contact person", "type": "string" }, "icon": { "description": "The URL to an icon file.", "type": "string" }, "keywords": { "description": "A list of string keywords", "type": "array", "items": { "type": "string" } }, "kubeVersion": { "description": "KubeVersion is a SemVer constraint specifying the version of Kubernetes required.", "type": "string" }, "maintainers": { "description": "A list of name and URL/email address combinations for the maintainer(s)", "type": "array", "items": { "$ref": "#/definitions/chart.Maintainer" } }, "name": { "description": "The name of the chart. Required.", "type": "string" }, "sources": { "description": "Source is the URL to the source code of this chart", "type": "array", "items": { "type": "string" } }, "tags": { "description": "The tags to check to enable chart", "type": "string" }, "type": { "description": "Specifies the chart type: application or library", "type": "string" }, "version": { "description": "A SemVer 2 conformant version string of the chart. Required.", "type": "string" } } }, "constant.AccessRole": { "type": "string", "enum": [ "Unknown", "Guest", "Reporter", "Developer", "Master", "Owner" ], "x-enum-comments": { "Anonymous": "Anonymous 匿名", "DEVELOPER": "DEVELOPER 开发", "Guest": "Guest 访客", "MASTER": "MASTER 管理", "OWNER": "OWNER 负责人", "REPORTER": "REPORTER 助手" }, "x-enum-descriptions": [ "Anonymous 匿名", "Guest 访客", "REPORTER 助手", "DEVELOPER 开发", "MASTER 管理", "OWNER 负责人" ], "x-enum-varnames": [ "Anonymous", "Guest", "REPORTER", "DEVELOPER", "MASTER", "OWNER" ] }, "constant.RepoDisplayModule": { "type": "object", "properties": { "activity": { "description": "仓库动态", "type": "boolean" }, "contributors": { "description": "仓库贡献者", "type": "boolean" }, "release": { "description": "仓库版本", "type": "boolean" } } }, "constant.RepoStatus": { "type": "integer", "format": "int32", "enum": [ 0, 1, 2 ], "x-enum-comments": { "RepoStatusArchived": "RepoStatusArchived 仓库已归档", "RepoStatusForking": "RepoStatusForking 仓库正在 fork中", "RepoStatusOK": "RepoStatusOK 仓库正常" }, "x-enum-descriptions": [ "RepoStatusOK 仓库正常", "RepoStatusArchived 仓库已归档", "RepoStatusForking 仓库正在 fork中" ], "x-enum-varnames": [ "RepoStatusOK", "RepoStatusArchived", "RepoStatusForking" ] }, "constant.SlugType": { "type": "integer", "format": "int32", "enum": [ 0, 1, 2, 3, 4 ], "x-enum-comments": { "SlugTypeGroup": "SlugTypeGroup 分组", "SlugTypeMission": "SlugTypeMission 任务集", "SlugTypeRegistry": "SlugTypeRegistry 包", "SlugTypeRepo": "SlugTypeRepo 仓库", "SlugTypeUnknown": "SlugTypeUnknown unknown" }, "x-enum-descriptions": [ "SlugTypeGroup 分组", "SlugTypeRepo 仓库", "SlugTypeMission 任务集", "SlugTypeRegistry 包", "SlugTypeUnknown unknown" ], "x-enum-varnames": [ "SlugTypeGroup", "SlugTypeRepo", "SlugTypeMission", "SlugTypeRegistry", "SlugTypeUnknown" ] }, "constant.UserEditable": { "type": "object", "properties": { "avatar": { "description": "可修改账户头像", "type": "boolean" }, "email": { "description": "可修改主邮箱", "type": "boolean" }, "logoff": { "description": "是否允许注销账户", "type": "boolean" }, "nickname": { "description": "可修改昵称", "type": "boolean" }, "sync-data": { "description": "是否允许同步昵称和头像", "type": "boolean" }, "username": { "description": "可修改账户名", "type": "boolean" } } }, "constant.UserType": { "type": "integer", "format": "int32", "enum": [ 0, 1, 2, 3, 4 ], "x-enum-comments": { "IoaUser": "IoaUser ioa 用户", "OauthUser": "OauthUser oauth 授权用户", "RobotUser": "RobotUser 助手用户", "TestUser": "TestUser 测试用户", "WeChatUser": "WeChatUser 微信用户" }, "x-enum-descriptions": [ "WeChatUser 微信用户", "OauthUser oauth 授权用户", "TestUser 测试用户", "RobotUser 助手用户", "IoaUser ioa 用户" ], "x-enum-varnames": [ "WeChatUser", "OauthUser", "TestUser", "RobotUser", "IoaUser" ] }, "constant.Visibility": { "type": "string", "enum": [ "Private", "Public", "Secret" ], "x-enum-comments": { "VisibilityPrivate": "VisibilityPrivate 私有仓库 - 仓库的访问必须显式授予每个用户", "VisibilityPublic": "VisibilityPublic 公共仓库 - 可以不经任何身份验证克隆该项目", "VisibilitySecret": "VisibilitySecret 加密仓库 - 仓库特定角色身份才能读取解密" }, "x-enum-descriptions": [ "VisibilityPrivate 私有仓库 - 仓库的访问必须显式授予每个用户", "VisibilityPublic 公共仓库 - 可以不经任何身份验证克隆该项目", "VisibilitySecret 加密仓库 - 仓库特定角色身份才能读取解密" ], "x-enum-varnames": [ "VisibilityPrivate", "VisibilityPublic", "VisibilitySecret" ] }, "convert.NullTime": { "type": "object", "properties": { "time": { "type": "string" }, "valid": { "description": "Valid is true if Time is not NULL", "type": "boolean" } } }, "die.WebError": { "type": "object", "properties": { "errcode": { "type": "integer" }, "errmsg": { "type": "string" }, "errparam": { "type": "object", "additionalProperties": {} } } }, "dto.ActivityCreateRepoDetail": { "type": "object", "properties": { "create_at": { "type": "string" }, "detail": { "description": "公仓转私仓或仓库被删除后为 null", "allOf": [ { "$ref": "#/definitions/dto.Repos4UserBase" } ] }, "exposed_repo_path": { "description": "activity 发生时仓库的 path,这时的 path 是可以公开的", "type": "string" }, "freeze": { "description": "仓库是否封禁", "type": "boolean" }, "repo_unaccessible": { "description": "仓库是否不可访问(公仓转私仓或仓库被删除后不可访问)", "type": "boolean" }, "visibility_level": { "description": "仓库可见性", "allOf": [ { "$ref": "#/definitions/constant.Visibility" } ] } } }, "dto.ActivityDate": { "type": "object", "properties": { "code_review_count": { "type": "integer" }, "code_reviews": { "type": "array", "items": { "$ref": "#/definitions/dto.ActivityRepoDetail" } }, "commit_count": { "type": "integer" }, "commits": { "type": "array", "items": { "$ref": "#/definitions/dto.ActivityRepoDetail" } }, "group_count": { "type": "integer" }, "groups": { "type": "array", "items": { "$ref": "#/definitions/dto.ActivityJoinGroupDetail" } }, "issues": { "type": "array", "items": { "$ref": "#/definitions/dto.ActivityRepoDetail" } }, "issues_count": { "type": "integer" }, "private_score": { "type": "integer" }, "pull_request_count": { "type": "integer" }, "pull_requests": { "type": "array", "items": { "$ref": "#/definitions/dto.ActivityRepoDetail" } }, "repo_count": { "type": "integer" }, "repos": { "type": "array", "items": { "$ref": "#/definitions/dto.ActivityCreateRepoDetail" } } } }, "dto.ActivityJoinGroupDetail": { "type": "object", "properties": { "create_at": { "type": "string" }, "detail": { "description": "组织详情,组织被删后为 null", "allOf": [ { "$ref": "#/definitions/dto.OrganizationUnion" } ] }, "remark": { "description": "组织别名,组织被删除后才有值", "type": "string" } } }, "dto.ActivityRepoDetail": { "type": "object", "properties": { "detail": { "description": "公仓转私仓或仓库被删除后为 null", "allOf": [ { "$ref": "#/definitions/dto.ActivitySlugDetail" } ] }, "exposed_repo_path": { "description": "activity 发生时仓库的 path,这时的 path 是可以公开的", "type": "string" }, "freeze": { "description": "仓库是否封禁", "type": "boolean" }, "repo_unaccessible": { "description": "仓库是否不可访问(公仓转私仓或仓库被删除后不可访问)", "type": "boolean" }, "time": { "type": "number" }, "visibility_level": { "description": "仓库可见性", "allOf": [ { "$ref": "#/definitions/constant.Visibility" } ] } } }, "dto.ActivitySlugDetail": { "type": "object", "properties": { "path": { "description": "完整仓库路径", "type": "string" } } }, "dto.AiAutoPrReq": { "type": "object", "properties": { "body": { "description": "需求内容", "type": "string" }, "branch": { "description": "基于该分支编码并提交代码到随机分支,然后将随机分支提 PR 到该分支", "type": "string" }, "source": { "description": "需求来源,默认为 issue,其他来源的需求可写上,会出现在代码提交日志的描述信息里", "type": "string" }, "title": { "description": "需求标题", "type": "string" }, "url": { "description": "需求来源 URL 地址", "type": "string" } } }, "dto.AiAutoPrResult": { "type": "object", "properties": { "buildLogUrl": { "description": "构建链接", "type": "string" }, "message": { "description": "message", "type": "string" }, "sn": { "description": "构建号", "type": "string" } } }, "dto.AiChatCompletionsChoice": { "type": "object", "properties": { "finish_reason": { "description": "结束原因", "type": "string" }, "index": { "description": "索引", "type": "integer" }, "message": { "description": "消息", "allOf": [ { "$ref": "#/definitions/dto.Message" } ] } } }, "dto.AiChatCompletionsReq": { "type": "object", "properties": { "messages": { "description": "对话内容", "type": "array", "items": { "$ref": "#/definitions/dto.Message" } }, "model": { "description": "模型名称", "type": "string" }, "stream": { "description": "是否流式返回结果,部分模型可能不支持非流式", "type": "boolean" } } }, "dto.AiChatCompletionsResult": { "type": "object", "properties": { "choices": { "description": "选择", "type": "array", "items": { "$ref": "#/definitions/dto.AiChatCompletionsChoice" } }, "created": { "description": "创建时间", "type": "integer" }, "id": { "description": "ID", "type": "string" }, "model": { "description": "模型", "type": "string" }, "object": { "description": "对象", "type": "string" } } }, "dto.AssetRecordType": { "type": "string", "enum": [ "slug_img", "slug_file", "repo_release", "repo_commit", "unknown" ], "x-enum-comments": { "AssetRepoCommit": "AssetRepoCommit commit 附件", "AssetRepoRelease": "AssetRepoRelease release 附件", "AssetSlugFile": "AssetSlugFile issue/pr 附件", "AssetSlugImg": "AssetSlugImg issue/pr 图片", "AssetUnknown": "AssetUnknown ..." }, "x-enum-descriptions": [ "AssetSlugImg issue/pr 图片", "AssetSlugFile issue/pr 附件", "AssetRepoRelease release 附件", "AssetRepoCommit commit 附件", "AssetUnknown ..." ], "x-enum-varnames": [ "AssetSlugImg", "AssetSlugFile", "AssetRepoRelease", "AssetRepoCommit", "AssetUnknown" ] }, "dto.AssetRecords": { "type": "object", "properties": { "id": { "type": "string" }, "origin_path": { "description": "来源地址,例如 release 附件的来源地址是对应的 release 页面。issue和pr文件没有。", "type": "string" }, "path": { "type": "string" }, "record_type": { "description": "资源类型,slug_img和slug_file可调用DeleteAsset接口直接删除该资源,repo_release和repo_commit则不行", "allOf": [ { "$ref": "#/definitions/dto.AssetRecordType" } ] }, "referer": { "type": "string" }, "size_in_byte": { "type": "integer" } } }, "dto.Assets": { "type": "object", "properties": { "content_type": { "type": "string" }, "ext": { "type": "object", "additionalProperties": { "type": "string" } }, "name": { "type": "string" }, "path": { "type": "string", "example": "/{slug}/-/assets/xxx/xxx/xxxx-xxx.png" }, "size": { "type": "integer" } } }, "dto.Badge": { "type": "object", "properties": { "desc": { "description": "徽章描述", "type": "string" }, "group": { "description": "徽章分组", "allOf": [ { "$ref": "#/definitions/dto.BadgeGroup" } ] }, "link": { "description": "徽章链接", "type": "string" }, "name": { "description": "徽章名称", "type": "string" }, "type": { "description": "徽章类型", "type": "string" }, "url": { "description": "徽章URL", "type": "string" } } }, "dto.BadgeGroup": { "type": "object", "properties": { "status": { "description": "徽章分组状态", "type": "string" }, "type": { "description": "徽章分组类型", "type": "string" }, "typeEn": { "description": "徽章分组英文类型", "type": "string" } } }, "dto.BuildCommonResult": { "type": "object", "properties": { "code": { "description": "返回码,0 表示成功,1 表示失败", "type": "integer" }, "message": { "description": "描述", "type": "string" } } }, "dto.BuildLogsResult": { "type": "object", "properties": { "data": { "description": "构建数据列表", "type": "array", "items": { "$ref": "#/definitions/dto.LogInfo" } }, "init": { "description": "当前仓库是否已经有构建记录,1 表示有构建记录,0 表示没有构建记录", "type": "boolean" }, "timestamp": { "description": "当前时间戳", "type": "integer" }, "total": { "description": "总数", "type": "integer" } } }, "dto.BuildResult": { "type": "object", "properties": { "buildLogUrl": { "description": "构建链接", "type": "string" }, "message": { "description": "构建信息", "type": "string" }, "sn": { "description": "构建号", "type": "string" }, "success": { "description": "构建是否触发成功,不代表构建结果", "type": "boolean" } } }, "dto.BuildStageResult": { "type": "object", "properties": { "content": { "description": "stage 日志内容,数组格式,一个元素表示一行日志", "type": "array", "items": { "type": "string" } }, "duration": { "description": "stage 耗时,单位:ms", "type": "integer" }, "endTime": { "description": "stage 结束时间", "type": "integer" }, "error": { "description": "stage 错误信息", "type": "string" }, "id": { "description": "stage id", "type": "string" }, "name": { "description": "stage 名称", "type": "string" }, "startTime": { "description": "stage 开始时间", "type": "integer" }, "status": { "description": "stage 状态: \"pending\", \"start\", \"success\", \"error\", \"cancel\", \"skipped\"", "type": "string" } } }, "dto.BuildStatusResult": { "type": "object", "properties": { "jsonConfig": { "description": "解析后的流水线JSON格式配置内容", "type": "string" }, "pipelinesStatus": { "description": "流水线的状态", "type": "object", "additionalProperties": { "$ref": "#/definitions/dto.PipelineStatus" } }, "rawConfig": { "description": "流水线原始配置内容", "type": "string" }, "status": { "description": "构建状态", "type": "string" } } }, "dto.ChartPackageDetail": { "type": "object", "properties": { "address": { "type": "string" }, "desc": { "type": "string" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "package": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "slug": { "type": "string" }, "tag_total": { "type": "integer" }, "tags": { "type": "array", "items": { "$ref": "#/definitions/dto.ChartTag" } } } }, "dto.ChartTag": { "type": "object", "properties": { "address": { "type": "string" }, "digest": { "type": "string" }, "is_deprecated": { "type": "boolean" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "metadata": { "$ref": "#/definitions/chart.Metadata" }, "name": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "size": { "type": "integer" } } }, "dto.ChartTagDetail": { "type": "object", "properties": { "address": { "type": "string" }, "is_deprecated": { "type": "boolean" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "metadata": { "$ref": "#/definitions/chart.Metadata" }, "package": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "size": { "type": "integer" }, "slug": { "type": "string" }, "tag": { "type": "string" } } }, "dto.CodeIssueSummary": { "type": "object", "properties": { "critical_count": { "description": "严重风险问题数量", "type": "integer" }, "critical_ignore_count": { "description": "严重风险问题忽略数量", "type": "integer" }, "enable": { "description": "是否开启源码信息扫描", "type": "boolean" }, "high_count": { "description": "高风险问题数量", "type": "integer" }, "high_ignore_count": { "description": "高风险问题忽略数量", "type": "integer" }, "ignored": { "description": "忽略的问题数量", "type": "integer" }, "low_count": { "description": "低风险问题数量", "type": "integer" }, "low_ignore_count": { "description": "低风险问题忽略数量", "type": "integer" }, "medium_count": { "description": "中风险问题数量", "type": "integer" }, "medium_ignore_count": { "description": "中风险问题忽略数量", "type": "integer" }, "open": { "description": "开启中问题数量", "type": "integer" } } }, "dto.CodeSensitiveSummary": { "type": "object", "properties": { "enable": { "description": "是否开启代码敏感信息扫描", "type": "boolean" }, "high_count": { "description": "高风险问题数量", "type": "integer" }, "high_ignore_count": { "description": "高风险问题忽略数量", "type": "integer" }, "ignored": { "description": "忽略问题数量", "type": "integer" }, "low_count": { "description": "低风险问题数量", "type": "integer" }, "low_ignore_count": { "description": "低风险问题忽略数量", "type": "integer" }, "medium_count": { "description": "中风险问题数量", "type": "integer" }, "medium_ignore_count": { "description": "中风险问题忽略数量", "type": "integer" }, "open": { "description": "开启中问题数量", "type": "integer" } } }, "dto.CodeVulOverview": { "type": "object", "properties": { "critical_vul_ignore_cnt": { "description": "忽略的严重风险漏洞的数量", "type": "integer" }, "critical_vul_open_cnt": { "description": "打开的严重风险级别漏洞的数量", "type": "integer" }, "enable": { "description": "是否开启代码漏洞扫描", "type": "boolean" }, "high_vul_ignore_cnt": { "description": "忽略的高风险级别漏洞的数量", "type": "integer" }, "high_vul_open_cnt": { "description": "打开的高风险级别漏洞的数量", "type": "integer" }, "ignored": { "description": "忽略问题数量", "type": "integer" }, "low_vul_ignore_cnt": { "description": "忽略的低风险级别漏洞的数量", "type": "integer" }, "low_vul_open_cnt": { "description": "打开的低风险级别漏洞的数量", "type": "integer" }, "medium_vul_ignore_cnt": { "description": "忽略的中风险级别漏洞的数量", "type": "integer" }, "medium_vul_open_cnt": { "description": "打开的中风险级别漏洞的数量", "type": "integer" }, "open": { "description": "开启中问题数量", "type": "integer" } } }, "dto.CommonRegistryPackageDetail": { "type": "object", "properties": { "address": { "type": "string" }, "desc": { "type": "string" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "package": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "slug": { "type": "string" }, "tag_total": { "type": "integer" }, "tags": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } } } }, "dto.CommonRegistryTag": { "type": "object", "properties": { "desc": { "type": "string" }, "digest": { "type": "string" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "name": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "size": { "type": "integer" }, "status": { "type": "string" } } }, "dto.CommonRegistryTagDetail": { "type": "object", "properties": { "address": { "type": "string" }, "dependencies": { "type": "array", "items": { "$ref": "#/definitions/dto.Dependency" } }, "desc": { "type": "string" }, "files": { "type": "array", "items": { "$ref": "#/definitions/dto.File" } }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "metadata": { "$ref": "#/definitions/dto.MetaData" }, "package": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "size": { "type": "integer" }, "slug": { "type": "string" }, "status": { "type": "string" }, "tag": { "type": "string" }, "tags": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } } } }, "dto.ConanMetaData": { "type": "object", "properties": { "author": { "type": "string" }, "conan_packages": { "description": "conan 的 package 列表", "type": "array", "items": { "$ref": "#/definitions/dto.ConanPackage" } }, "conan_recipe_revision": { "description": "conan recipe 的 revision, conan 制品专用字段", "type": "string" }, "conan_reference": { "type": "string" }, "home_page": { "type": "string" }, "license_url": { "type": "string" }, "package_name": { "type": "string" }, "package_tag": { "type": "string" }, "package_type": { "type": "string" }, "readme": { "type": "string" }, "repository_url": { "type": "string" } } }, "dto.ConanPackage": { "type": "object", "properties": { "arch": { "type": "string" }, "build_type": { "type": "string" }, "compiler": { "type": "object", "additionalProperties": { "type": "string" } }, "options": { "type": "object", "additionalProperties": { "type": "string" } }, "os": { "type": "string" }, "package_id": { "type": "string" }, "package_revision": { "type": "string" }, "requires": { "type": "array", "items": { "type": "string" } } } }, "dto.ConanRegistryTagDetail": { "type": "object", "properties": { "address": { "type": "string" }, "dependencies": { "type": "array", "items": { "$ref": "#/definitions/dto.Dependency" } }, "desc": { "type": "string" }, "files": { "type": "array", "items": { "$ref": "#/definitions/dto.File" } }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "metadata": { "$ref": "#/definitions/dto.ConanMetaData" }, "package": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "size": { "type": "integer" }, "slug": { "type": "string" }, "status": { "type": "string" }, "tag": { "type": "string" }, "tags": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } } } }, "dto.ContainerAnnotation": { "type": "object", "properties": { "revision": { "type": "string" }, "sn": { "type": "string" }, "version": { "type": "string" } } }, "dto.ContainerImage": { "type": "object", "properties": { "arch": { "type": "string" }, "digest": { "type": "string" }, "layers": { "type": "array", "items": { "$ref": "#/definitions/dto.ContainerImageLayer" } }, "os": { "type": "string" }, "size": { "type": "integer" } } }, "dto.ContainerImageLayer": { "type": "object", "properties": { "instruction": { "type": "string" }, "size": { "type": "integer" } } }, "dto.ContainerPackageDetail": { "type": "object", "properties": { "address": { "type": "string" }, "desc": { "type": "string" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "package": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "slug": { "type": "string" }, "tag_total": { "type": "integer" }, "tags": { "type": "array", "items": { "$ref": "#/definitions/dto.ContainerTag" } } } }, "dto.ContainerTag": { "type": "object", "properties": { "address": { "type": "string" }, "annotations": { "$ref": "#/definitions/dto.ContainerAnnotation" }, "images": { "type": "array", "items": { "$ref": "#/definitions/dto.ContainerImage" } }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "name": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "type": { "type": "string" } } }, "dto.ContainerTagDetail": { "type": "object", "properties": { "address": { "type": "string" }, "annotations": { "$ref": "#/definitions/dto.ContainerAnnotation" }, "image": { "$ref": "#/definitions/dto.ContainerImage" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "matches_requested_arch": { "description": "返回的结果是否和提供的架构匹配", "type": "boolean" }, "options": { "type": "array", "items": { "$ref": "#/definitions/dto.ContainerImage" } }, "package": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "slug": { "type": "string" }, "tag": { "type": "string" }, "type": { "type": "string" } } }, "dto.CreateGroupReq": { "type": "object", "properties": { "bind_domain": { "description": "BindDomain 根组织绑定的域名", "type": "string" }, "description": { "type": "string" }, "path": { "type": "string" }, "remark": { "type": "string" } } }, "dto.CreateMissionReq": { "type": "object", "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "repos": { "type": "array", "items": { "type": "string" } }, "visibility": { "type": "string", "default": "public", "enum": [ "public", "private" ] } } }, "dto.CreateRepoReq": { "type": "object", "properties": { "description": { "type": "string" }, "license": { "type": "string" }, "name": { "type": "string" }, "visibility": { "type": "string", "default": "public", "enum": [ "public", "private", "secret" ] } } }, "dto.Dependency": { "type": "object", "properties": { "artifact": { "type": "string" }, "framework_name": { "type": "string" }, "name": { "type": "string" } } }, "dto.DockerModelConfig": { "type": "object", "properties": { "architecture": { "type": "string" }, "format": { "description": "Format the packaging format of the model file(s), currently the only supported value is gguf.", "type": "string" }, "format_version": { "description": "FormatVersion the version of the format", "type": "string" }, "gguf": { "$ref": "#/definitions/dto.GGUF" }, "parameters": { "type": "string" }, "quantization": { "type": "string" }, "size": { "type": "string" } } }, "dto.DockerModelDescriptor": { "type": "object", "properties": { "created": { "type": "string" } } }, "dto.DockerModelPackageDetail": { "type": "object", "properties": { "address": { "type": "string" }, "desc": { "type": "string" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "package": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "slug": { "type": "string" }, "tag_total": { "type": "integer" }, "tags": { "type": "array", "items": { "$ref": "#/definitions/dto.DockerModelTag" } } } }, "dto.DockerModelTag": { "type": "object", "properties": { "address": { "type": "string" }, "docker_model_config": { "$ref": "#/definitions/dto.DockerModelConfig" }, "docker_model_descriptor": { "$ref": "#/definitions/dto.DockerModelDescriptor" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "name": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "size": { "type": "integer" } } }, "dto.DockerModelTagDetail": { "type": "object", "properties": { "address": { "type": "string" }, "docker_model_config": { "$ref": "#/definitions/dto.DockerModelConfig" }, "docker_model_descriptor": { "$ref": "#/definitions/dto.DockerModelDescriptor" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "package": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "size": { "type": "integer" }, "slug": { "type": "string" }, "tag": { "type": "string" } } }, "dto.DocumentStatistics": { "type": "object", "properties": { "count": { "type": "integer" }, "size": { "type": "integer" } } }, "dto.EmbeddingModel": { "type": "object", "properties": { "dimension": { "type": "integer" }, "name": { "type": "string" } } }, "dto.EmbeddingModels": { "type": "object", "properties": { "dimension": { "type": "integer" }, "name": { "type": "string" } } }, "dto.File": { "type": "object", "properties": { "name": { "type": "string" }, "size": { "type": "integer" } } }, "dto.Forks": { "type": "object", "properties": { "created_at": { "type": "string" }, "fork_count": { "type": "integer" }, "freeze": { "type": "boolean" }, "nickname": { "type": "string" }, "path": { "type": "string" }, "user_freeze": { "type": "boolean" }, "user_lock": { "type": "boolean" }, "username": { "type": "string" } } }, "dto.GGUF": { "type": "object", "additionalProperties": true }, "dto.GetBadgeReq": { "type": "object", "properties": { "branch": { "description": "分支名,例如:main。不传则为默认分支,获取默认分支最新徽章。传了分支名,则获取该分支最新提交记录对应的徽章。", "type": "string" } } }, "dto.GetBadgeResult": { "type": "object", "properties": { "color": { "description": "徽章颜色", "type": "string" }, "label": { "description": "徽章左侧显示内容", "type": "string" }, "link": { "description": "徽章链接", "type": "string" }, "links": { "description": "徽章链接列表", "type": "array", "items": { "type": "string" } }, "message": { "description": "徽章右侧显示内容", "type": "string" } } }, "dto.GroupSettingReq": { "type": "object", "properties": { "email_verification": { "description": "组织限制指定邮箱认证才能加入", "type": "array", "items": { "type": "string" } }, "group_protection": { "description": "组织保护开关,0 - 关闭,1 - 打开", "type": "integer" }, "hide_members": { "description": "是否对外隐藏组织成员,0 - 否, 1 - 是", "type": "integer" }, "hide_sub_groups": { "description": "是否对外隐藏子组织,0 - 否, 1 - 是", "type": "integer" }, "show_private_repo_watermark": { "description": "是否对外显示私有仓库水印,0 - 否, 1 - 是", "type": "integer" }, "values": { "description": "SettingValue 组织设置值,多个选项,用逗号拼接。可选值来自 SettingNamesArray 的值,e.g. disable_organization_readme,cloud_native_dev_only", "type": "string" } } }, "dto.InheritMembersUser": { "type": "object", "properties": { "access_level": { "$ref": "#/definitions/constant.AccessRole" }, "avatar": { "type": "string" }, "created_at": { "type": "string" }, "email": { "type": "string" }, "email_verification": { "type": "string" }, "freeze": { "type": "boolean" }, "id": { "type": "string" }, "inviter": { "$ref": "#/definitions/dto.Users" }, "join_time": { "type": "string" }, "locked": { "type": "boolean" }, "nickname": { "type": "string" }, "self_member": { "type": "boolean" }, "type": { "$ref": "#/definitions/constant.UserType" }, "username": { "type": "string" }, "verified": { "description": "认证类型", "type": "integer" }, "verified_expire_in": { "description": "认证过期时间", "type": "string" } } }, "dto.IssueConfig": { "type": "object", "properties": { "labels": { "description": "逗号分隔的标签字符串,如 \"bug,feature\"", "type": "string" }, "state": { "description": "\"open\", \"closed\"", "type": "string" } } }, "dto.KnowledgeBaseInfoRes": { "type": "object", "properties": { "embedding_model": { "$ref": "#/definitions/dto.EmbeddingModels" }, "exclude": { "type": "string" }, "id": { "type": "string" }, "include": { "type": "string" }, "issue_last_sync_time": { "type": "string" }, "issue_sync_enabled": { "type": "boolean" }, "last_commit_sha": { "type": "string" }, "metadata": { "$ref": "#/definitions/dto.KnowledgeBaseMetadata" }, "statistics": { "$ref": "#/definitions/dto.DocumentStatistics" } } }, "dto.KnowledgeBaseMetadata": { "type": "object", "properties": { "issue": { "$ref": "#/definitions/dto.IssueConfig" }, "processing": { "$ref": "#/definitions/dto.ProcessingConfig" }, "version": { "type": "string" } } }, "dto.LastPusher": { "type": "object", "properties": { "is_frozen": { "type": "boolean" }, "is_lock": { "type": "boolean" }, "name": { "type": "string" }, "nickname": { "type": "string" }, "push_at": { "type": "string" } } }, "dto.ListBadgeReq": { "type": "object" }, "dto.ListBadgeResult": { "type": "object", "properties": { "badges": { "description": "徽章列表", "type": "array", "items": { "$ref": "#/definitions/dto.Badge" } } } }, "dto.ListForks": { "type": "object", "properties": { "fork_tree_count": { "type": "integer" }, "forks": { "type": "array", "items": { "$ref": "#/definitions/dto.Forks" } } } }, "dto.ListInheritMembers": { "type": "object", "properties": { "inherit_path": { "type": "string" }, "total": { "type": "integer" }, "users": { "type": "array", "items": { "$ref": "#/definitions/dto.InheritMembersUser" } } } }, "dto.LogInfo": { "type": "object", "properties": { "buildLogUrl": { "description": "构建日志 url", "type": "string" }, "commitTitle": { "description": "提交日志 title", "type": "string" }, "createTime": { "description": "构建开始时间", "type": "string" }, "duration": { "description": "构建耗时,单位:ms", "type": "integer" }, "event": { "description": "事件名", "type": "string" }, "eventUrl": { "description": "事件 url", "type": "string" }, "freeze": { "description": "构建用户是否被冻结", "type": "boolean" }, "groupName": { "description": "组织名", "type": "string" }, "labels": { "description": "流水线标签", "type": "string" }, "nickName": { "description": "构建用户昵称", "type": "string" }, "pipelineFailCount": { "description": "失败的子流水线个数", "type": "integer" }, "pipelineSuccessCount": { "description": "成功的子流水线个数", "type": "integer" }, "pipelineTotalCount": { "description": "子流水线个数", "type": "integer" }, "sha": { "description": "commitid", "type": "string" }, "slug": { "description": "仓库路径", "type": "string" }, "sn": { "description": "构建号", "type": "string" }, "sourceRef": { "description": "源分支名", "type": "string" }, "sourceSlug": { "description": "源仓库路径", "type": "string" }, "status": { "description": "构建状态", "type": "string" }, "targetRef": { "description": "目标分支名", "type": "string" }, "title": { "description": "构建 title", "type": "string" }, "userName": { "description": "用户名", "type": "string" } } }, "dto.MemberAccessLevel": { "type": "object", "properties": { "access_level": { "$ref": "#/definitions/constant.AccessRole" }, "path": { "type": "string" } } }, "dto.MemberAccessLevelInSlugUnion": { "type": "object", "properties": { "access_level": { "$ref": "#/definitions/constant.AccessRole" }, "inherit": { "type": "boolean" }, "read_privilege": { "type": "boolean" }, "write_privilege": { "type": "boolean" } } }, "dto.Message": { "type": "object", "properties": { "content": { "description": "内容", "type": "string" }, "role": { "description": "角色,可选值:user、assistant", "type": "string" } } }, "dto.MetaData": { "type": "object", "properties": { "author": { "type": "string" }, "home_page": { "type": "string" }, "license_url": { "type": "string" }, "package_name": { "type": "string" }, "package_tag": { "type": "string" }, "package_type": { "type": "string" }, "readme": { "type": "string" }, "repository_url": { "type": "string" } } }, "dto.MetadataCondition": { "type": "object", "properties": { "comparison_operator": { "description": "运算符: \"is\", \"is not\", \"contains\", \"not contains\", \"starts with\", \"ends with\", \"is empty\", \"is not empty\"", "type": "string" }, "name": { "description": "字段名称: \"position\", \"path\", \"type\"", "type": "string" }, "value": { "description": "比较值(\"is empty\" 和 \"is not empty\" 时忽略此字段)", "type": "string" } } }, "dto.MetadataFilteringConditions": { "type": "object", "properties": { "conditions": { "type": "array", "items": { "$ref": "#/definitions/dto.MetadataCondition" } }, "logical_operator": { "description": "\"and\" 或 \"or\",默认 \"and\"", "type": "string" } } }, "dto.MissionPostViewReq": { "type": "object", "properties": { "ids": { "description": "视图唯一标识列表,按此顺序排序", "type": "array", "items": { "type": "string" } } } }, "dto.MissionView": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "$ref": "#/definitions/dto.MissionViewType" } } }, "dto.MissionViewConfig": { "type": "object", "properties": { "fields": { "description": "字段配置", "type": "array", "items": { "$ref": "#/definitions/dto.MissionViewFieldConfig" } }, "group": { "description": "分组信息", "allOf": [ { "$ref": "#/definitions/dto.MissionViewGroup" } ] }, "id": { "description": "视图唯一标识", "type": "string" }, "selectors": { "description": "筛选条件", "type": "array", "items": { "$ref": "#/definitions/dto.MissionViewSelector" } }, "sorts": { "description": "排序条件", "type": "array", "items": { "$ref": "#/definitions/dto.MissionViewSort" } }, "type": { "description": "视图类型", "allOf": [ { "$ref": "#/definitions/dto.MissionViewType" } ] } } }, "dto.MissionViewFieldConfig": { "type": "object", "properties": { "field": { "type": "string" }, "width": { "type": "integer" } } }, "dto.MissionViewGroup": { "type": "object", "properties": { "customOrders": { "$ref": "#/definitions/dto.MissionViewGroupCustom" }, "customVisible": { "$ref": "#/definitions/dto.MissionViewGroupCustom" }, "expendedList": { "type": "array", "items": {} }, "field": { "type": "string" }, "order": { "$ref": "#/definitions/dto.MissionViewSortOrder" } } }, "dto.MissionViewGroupCustom": { "type": "object", "properties": { "field": { "type": "string" }, "value": { "type": "array", "items": {} } } }, "dto.MissionViewSelector": { "type": "object", "properties": { "field": { "type": "string" }, "operator": { "$ref": "#/definitions/dto.OperatorType" }, "value": { "type": "array", "items": { "type": "string" } } } }, "dto.MissionViewSort": { "type": "object", "properties": { "field": { "type": "string" }, "order": { "$ref": "#/definitions/dto.MissionViewSortOrder" } } }, "dto.MissionViewSortOrder": { "type": "string", "enum": [ "asc", "desc" ], "x-enum-varnames": [ "MissionViewSortOrderAsc", "MissionViewSortOrderDesc" ] }, "dto.MissionViewType": { "type": "string", "enum": [ "table", "board", "gantt" ], "x-enum-varnames": [ "MissionViewTypeTable", "MissionViewTypeBoard", "MissionViewTypeGantt" ] }, "dto.Missions4User": { "type": "object", "properties": { "access": { "allOf": [ { "$ref": "#/definitions/constant.AccessRole" } ], "readOnly": true }, "created_at": { "type": "string" }, "description": { "type": "string" }, "freeze": { "type": "boolean", "readOnly": true }, "id": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" }, "pinned": { "type": "boolean" }, "pinned_time": { "type": "string" }, "star_time": { "type": "string" }, "stared": { "type": "boolean" }, "updated_at": { "type": "string" }, "visibility_level": { "$ref": "#/definitions/constant.Visibility" } } }, "dto.OperatorType": { "type": "string", "enum": [ "equal", "equals", "not_equals", "contains", "contains_all", "not_contains", "empty", "not_empty", "before", "after", "time_selector" ], "x-enum-comments": { "OperationTypeContainsAll": "OperationTypeContainsAll ...", "OperatorTypeAfter": "OperatorTypeAfter ...", "OperatorTypeBefore": "OperatorTypeBefore ...", "OperatorTypeContains": "OperatorTypeContains ...", "OperatorTypeDateRange": "OperatorTypeDateRange 兼容旧版本数据类型定义", "OperatorTypeEmpty": "OperatorTypeEmpty ...", "OperatorTypeEqual": "OperatorTypeEqual ...", "OperatorTypeNotContains": "OperatorTypeNotContains ...", "OperatorTypeNotEmpty": "OperatorTypeNotEmpty ...", "OperatorTypeNotEqual": "OperatorTypeNotEqual ...", "OperatorTypeOldEqual": "OperatorTypeOldEqual 兼容旧版本数据类型定义" }, "x-enum-descriptions": [ "OperatorTypeOldEqual 兼容旧版本数据类型定义", "OperatorTypeEqual ...", "OperatorTypeNotEqual ...", "OperatorTypeContains ...", "OperationTypeContainsAll ...", "OperatorTypeNotContains ...", "OperatorTypeEmpty ...", "OperatorTypeNotEmpty ...", "OperatorTypeBefore ...", "OperatorTypeAfter ...", "OperatorTypeDateRange 兼容旧版本数据类型定义" ], "x-enum-varnames": [ "OperatorTypeOldEqual", "OperatorTypeEqual", "OperatorTypeNotEqual", "OperatorTypeContains", "OperationTypeContainsAll", "OperatorTypeNotContains", "OperatorTypeEmpty", "OperatorTypeNotEmpty", "OperatorTypeBefore", "OperatorTypeAfter", "OperatorTypeDateRange" ] }, "dto.OrganizationAccess": { "type": "object", "properties": { "access_role": { "description": "AccessRole 用户在当前资源的最大权限", "allOf": [ { "$ref": "#/definitions/constant.AccessRole" } ] }, "all_member_count": { "type": "integer" }, "all_sub_group_count": { "description": "下面所有层级子组织", "type": "integer" }, "all_sub_mission_count": { "description": "下面所有层级子任务", "type": "integer" }, "all_sub_registry_count": { "type": "integer" }, "all_sub_repo_count": { "description": "下面所有层级子仓库", "type": "integer" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "domain": { "type": "string" }, "email": { "type": "string" }, "follow_count": { "type": "integer" }, "freeze": { "type": "boolean", "readOnly": true }, "has_sub_group": { "type": "boolean" }, "id": { "type": "string" }, "member_count": { "type": "integer" }, "name": { "type": "string" }, "path": { "type": "string" }, "pinned": { "type": "boolean" }, "pinned_time": { "type": "string" }, "readme_repo_path": { "type": "string", "readOnly": true }, "remark": { "type": "string" }, "site": { "type": "string" }, "sub_group_count": { "description": "下一级子组织数量", "type": "integer" }, "sub_mission_count": { "type": "integer" }, "sub_registry_count": { "type": "integer" }, "sub_repo_count": { "description": "下一级子仓库", "type": "integer" }, "updated_at": { "type": "string" }, "wechat_mp": { "type": "string" } } }, "dto.OrganizationSettingWithParent": { "type": "object", "properties": { "can_show_members": { "description": "上级group设置了hide_members为1,则下级都不能显示", "type": "boolean" }, "can_show_sub_groups": { "description": "上级group设置了hide_sub_groups为1,则下级都不能显示", "type": "boolean" }, "can_show_watermark": { "type": "boolean" }, "email_verification": { "type": "array", "items": { "type": "string" } }, "group_protection": { "type": "integer" }, "hide_members": { "description": "是否对外隐藏组织成员,0 - 否, 1 - 是", "type": "integer" }, "hide_sub_groups": { "description": "是否对外隐藏子组织,0 - 否, 1 - 是", "type": "integer" }, "root_email_verification": { "type": "array", "items": { "type": "string" } }, "root_group_protection": { "type": "boolean" }, "root_values": { "$ref": "#/definitions/organization.SettingValue" }, "show_private_repo_watermark": { "type": "integer" }, "values": { "$ref": "#/definitions/organization.SettingValue" } } }, "dto.OrganizationUnion": { "type": "object", "properties": { "all_member_count": { "type": "integer" }, "all_sub_group_count": { "description": "下面所有层级子组织", "type": "integer" }, "all_sub_mission_count": { "description": "下面所有层级子任务", "type": "integer" }, "all_sub_registry_count": { "type": "integer" }, "all_sub_repo_count": { "description": "下面所有层级子仓库", "type": "integer" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "domain": { "type": "string" }, "email": { "type": "string" }, "follow_count": { "type": "integer" }, "freeze": { "type": "boolean", "readOnly": true }, "has_sub_group": { "type": "boolean" }, "id": { "type": "string" }, "member_count": { "type": "integer" }, "name": { "type": "string" }, "path": { "type": "string" }, "pinned": { "type": "boolean" }, "pinned_time": { "type": "string" }, "readme_repo_path": { "type": "string", "readOnly": true }, "remark": { "type": "string" }, "site": { "type": "string" }, "sub_group_count": { "description": "下一级子组织数量", "type": "integer" }, "sub_mission_count": { "type": "integer" }, "sub_registry_count": { "type": "integer" }, "sub_repo_count": { "description": "下一级子仓库", "type": "integer" }, "updated_at": { "type": "string" }, "wechat_mp": { "type": "string" } } }, "dto.OutsideCollaboratorInRepo": { "type": "object", "properties": { "access_level": { "$ref": "#/definitions/constant.AccessRole" }, "avatar": { "type": "string" }, "created_at": { "type": "string" }, "email": { "type": "string" }, "freeze": { "type": "boolean" }, "id": { "type": "string" }, "join_time": { "type": "string" }, "locked": { "type": "boolean" }, "nickname": { "type": "string" }, "type": { "$ref": "#/definitions/constant.UserType" }, "username": { "type": "string" }, "verified": { "description": "认证类型", "type": "integer" }, "verified_expire_in": { "description": "认证过期时间", "type": "string" } } }, "dto.Package": { "type": "object", "properties": { "count": { "type": "integer" }, "description": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" } }, "last_artifact_name": { "type": "string" }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "name": { "type": "string" }, "package": { "type": "string" }, "package_type": { "$ref": "#/definitions/dto.PackageType" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" } } }, "dto.PackageDetail": { "type": "object", "properties": { "cargo": { "$ref": "#/definitions/dto.CommonRegistryPackageDetail" }, "composer": { "$ref": "#/definitions/dto.CommonRegistryPackageDetail" }, "conan": { "$ref": "#/definitions/dto.CommonRegistryPackageDetail" }, "docker": { "$ref": "#/definitions/dto.ContainerPackageDetail" }, "docker_model": { "$ref": "#/definitions/dto.DockerModelPackageDetail" }, "helm": { "$ref": "#/definitions/dto.ChartPackageDetail" }, "maven": { "$ref": "#/definitions/dto.CommonRegistryPackageDetail" }, "npm": { "$ref": "#/definitions/dto.CommonRegistryPackageDetail" }, "nuget": { "$ref": "#/definitions/dto.CommonRegistryPackageDetail" }, "ohpm": { "$ref": "#/definitions/dto.CommonRegistryPackageDetail" }, "pypi": { "$ref": "#/definitions/dto.CommonRegistryPackageDetail" } } }, "dto.PackageType": { "type": "string", "enum": [ "all", "docker", "helm", "docker-model", "npm", "maven", "ohpm", "pypi", "composer", "nuget", "conan", "cargo" ], "x-enum-comments": { "PackageTypeArtifactory": "PackageTypeArtifactory 仓库下的制品", "PackageTypeCargo": "PackageTypeCargo cargo 制品", "PackageTypeComposer": "PackageTypeComposer composer 制品", "PackageTypeConan": "PackageTypeConan conan 制品", "PackageTypeDocker": "PackageTypeDocker 容器制品,由 container 兼容", "PackageTypeDockerModel": "PackageTypeDockerModel docker model 制品", "PackageTypeHelm": "PackageTypeHelm helm chart 制品,由 chart 兼容", "PackageTypeMaven": "PackageTypeMaven maven 制品", "PackageTypeNpm": "PackageTypeNpm npm 制品", "PackageTypeNuget": "PackageTypeNuget nuget 制品", "PackageTypeOhpm": "PackageTypeOhpm ohpm 制品", "PackageTypePypi": "PackageTypePypi pypi 制品" }, "x-enum-descriptions": [ "PackageTypeArtifactory 仓库下的制品", "PackageTypeDocker 容器制品,由 container 兼容", "PackageTypeHelm helm chart 制品,由 chart 兼容", "PackageTypeDockerModel docker model 制品", "PackageTypeNpm npm 制品", "PackageTypeMaven maven 制品", "PackageTypeOhpm ohpm 制品", "PackageTypePypi pypi 制品", "PackageTypeComposer composer 制品", "PackageTypeNuget nuget 制品", "PackageTypeConan conan 制品", "PackageTypeCargo cargo 制品" ], "x-enum-varnames": [ "PackageTypeArtifactory", "PackageTypeDocker", "PackageTypeHelm", "PackageTypeDockerModel", "PackageTypeNpm", "PackageTypeMaven", "PackageTypeOhpm", "PackageTypePypi", "PackageTypeComposer", "PackageTypeNuget", "PackageTypeConan", "PackageTypeCargo" ] }, "dto.PipelineLabel": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "array", "items": { "type": "string" } } } }, "dto.PipelineStatus": { "type": "object", "properties": { "duration": { "description": "流水线耗时", "type": "integer" }, "id": { "description": "流水线 id", "type": "string" }, "labels": { "description": "流水线标签", "type": "array", "items": { "$ref": "#/definitions/dto.PipelineLabel" } }, "metricCoreHours": { "description": "流水线计费核时", "type": "number" }, "metricDuration": { "description": "流水线计费耗时,单位:ms", "type": "number" }, "stages": { "description": "流水线各 stage 的状态", "type": "array", "items": { "$ref": "#/definitions/dto.Stage" } }, "status": { "description": "流水线状态", "type": "string" } } }, "dto.ProcessingConfig": { "type": "object", "properties": { "chunk_overlap": { "type": "integer" }, "chunk_size": { "type": "integer" }, "text_separator": { "type": "string" } } }, "dto.PyPIMetaData": { "type": "object", "properties": { "author": { "type": "string" }, "home_page": { "type": "string" }, "license_url": { "type": "string" }, "minimum_stability": { "type": "string" }, "package_name": { "type": "string" }, "package_tag": { "type": "string" }, "package_type": { "type": "string" }, "readme": { "type": "string" }, "repository_url": { "type": "string" } } }, "dto.PyPIRegistryTagDetail": { "type": "object", "properties": { "address": { "type": "string" }, "dependencies": { "type": "array", "items": { "$ref": "#/definitions/dto.Dependency" } }, "desc": { "type": "string" }, "files": { "type": "array", "items": { "$ref": "#/definitions/dto.File" } }, "last_pusher": { "$ref": "#/definitions/dto.LastPusher" }, "metadata": { "$ref": "#/definitions/dto.PyPIMetaData" }, "package": { "type": "string" }, "pull_count": { "type": "integer" }, "recent_pull_count": { "type": "integer" }, "size": { "type": "integer" }, "slug": { "type": "string" }, "status": { "type": "string" }, "tag": { "type": "string" }, "tags": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } } } }, "dto.QueryKnowledgeBaseReq": { "type": "object", "properties": { "metadata_filtering_conditions": { "description": "元数据过滤条件", "allOf": [ { "$ref": "#/definitions/dto.MetadataFilteringConditions" } ] }, "query": { "description": "查询语句", "type": "string" }, "score_threshold": { "description": "分数阈值", "type": "number" }, "top_k": { "description": "返回结果的数量", "type": "integer" } } }, "dto.QueryKnowledgeBaseRes": { "type": "object", "properties": { "chunk": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": true }, "score": { "type": "number" } } }, "dto.Registry4User": { "type": "object", "properties": { "access": { "allOf": [ { "$ref": "#/definitions/constant.AccessRole" } ], "readOnly": true }, "artifact_policy": { "type": "string", "default": "all", "enum": [ "all", "snapshot", "release" ] }, "created_at": { "type": "string" }, "description": { "type": "string" }, "freeze": { "type": "boolean", "readOnly": true }, "id": { "type": "string" }, "kind": { "type": "string" }, "last_push_time": { "type": "string" }, "last_push_user": { "$ref": "#/definitions/dto.Users" }, "name": { "type": "string" }, "overwrite_policy": { "type": "string", "default": "forbid", "enum": [ "forbid", "allow" ] }, "path": { "type": "string" }, "pinned": { "type": "boolean" }, "pinned_time": { "type": "string" }, "pkg_count": { "type": "integer", "readOnly": true }, "star_time": { "type": "string" }, "stared": { "type": "boolean" }, "updated_at": { "type": "string" }, "used_size": { "type": "integer", "readOnly": true }, "visibility_level": { "$ref": "#/definitions/constant.Visibility" } } }, "dto.RepoLanguage": { "type": "object", "properties": { "color": { "type": "string" }, "language": { "type": "string" } } }, "dto.RepoPatch": { "type": "object", "properties": { "description": { "type": "string" }, "license": { "type": "string" }, "site": { "type": "string" }, "topics": { "type": "array", "items": { "type": "string" } } } }, "dto.RepoSecurityOverview": { "type": "object", "properties": { "code_issue": { "$ref": "#/definitions/dto.CodeIssueSummary" }, "code_sensitive": { "$ref": "#/definitions/dto.CodeSensitiveSummary" }, "code_vulnerability": { "$ref": "#/definitions/dto.CodeVulOverview" }, "risk_cnt": { "$ref": "#/definitions/dto.RepoSecurityRiskCnt" } } }, "dto.RepoSecurityRiskCnt": { "type": "object", "properties": { "code_issue_enable": { "description": "是否开启源码扫描", "type": "boolean" }, "code_issue_risk_cnt": { "description": "源码扫描风险数量 (严重+高风险)", "type": "integer" }, "code_sensitive_enable": { "description": "是否开启代码敏感信息扫描", "type": "boolean" }, "code_sensitive_risk_cnt": { "description": "敏感信息风险数量(高风险)", "type": "integer" }, "code_vulnerability_enable": { "description": "是否开启代码漏洞扫描", "type": "boolean" }, "code_vulnerability_risk_cnt": { "description": "代码漏洞风险数量(严重+高风险)", "type": "integer" }, "enable": { "description": "是否开启安全模块", "type": "boolean" }, "total": { "description": "总计数", "type": "integer" } } }, "dto.RepoStarUsers": { "type": "object", "properties": { "my_follow_count": { "type": "integer" }, "total": { "type": "integer" }, "users": { "type": "array", "items": { "$ref": "#/definitions/dto.StarUser" } } } }, "dto.Repos4User": { "type": "object", "properties": { "access": { "allOf": [ { "$ref": "#/definitions/constant.AccessRole" } ], "readOnly": true }, "created_at": { "type": "string" }, "description": { "type": "string" }, "display_module": { "$ref": "#/definitions/constant.RepoDisplayModule" }, "flags": { "$ref": "#/definitions/flags.Repo" }, "fork_count": { "type": "integer" }, "forked_from_repo": { "description": "预留", "allOf": [ { "$ref": "#/definitions/dto.Slugs" } ] }, "freeze": { "type": "boolean", "readOnly": true }, "id": { "type": "string" }, "language": { "description": "仓库程序语言,预留", "type": "string" }, "languages": { "description": "仓库语言", "allOf": [ { "$ref": "#/definitions/dto.RepoLanguage" } ] }, "last_update_nickname": { "description": "最新代码更新人姓名", "type": "string" }, "last_update_username": { "description": "最新代码更新人账户名", "type": "string" }, "last_updated_at": { "description": "最新代码更新时间", "allOf": [ { "$ref": "#/definitions/convert.NullTime" } ] }, "license": { "type": "string" }, "mark_count": { "type": "integer" }, "name": { "type": "string" }, "open_issue_count": { "description": "开启的issue数", "type": "integer" }, "open_pull_request_count": { "description": "开启的pull request数", "type": "integer" }, "path": { "description": "完整仓库路径", "type": "string" }, "pinned": { "type": "boolean" }, "pinned_time": { "type": "string" }, "second_languages": { "description": "第二语言", "allOf": [ { "$ref": "#/definitions/dto.RepoLanguage" } ] }, "site": { "type": "string" }, "star_count": { "type": "integer" }, "star_time": { "type": "string" }, "stared": { "type": "boolean" }, "status": { "allOf": [ { "$ref": "#/definitions/constant.RepoStatus" } ], "readOnly": true }, "tags": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" } } } }, "topics": { "type": "string" }, "updated_at": { "type": "string" }, "visibility_level": { "$ref": "#/definitions/constant.Visibility" }, "web_url": { "type": "string" } } }, "dto.Repos4UserBase": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "display_module": { "$ref": "#/definitions/constant.RepoDisplayModule" }, "flags": { "$ref": "#/definitions/flags.Repo" }, "fork_count": { "type": "integer" }, "forked_from_repo": { "description": "预留", "allOf": [ { "$ref": "#/definitions/dto.Slugs" } ] }, "freeze": { "type": "boolean", "readOnly": true }, "id": { "type": "string" }, "language": { "description": "仓库程序语言,预留", "type": "string" }, "languages": { "description": "仓库语言", "allOf": [ { "$ref": "#/definitions/dto.RepoLanguage" } ] }, "last_update_nickname": { "description": "最新代码更新人姓名", "type": "string" }, "last_update_username": { "description": "最新代码更新人账户名", "type": "string" }, "last_updated_at": { "description": "最新代码更新时间", "allOf": [ { "$ref": "#/definitions/convert.NullTime" } ] }, "license": { "type": "string" }, "mark_count": { "type": "integer" }, "name": { "type": "string" }, "open_issue_count": { "description": "开启的issue数", "type": "integer" }, "open_pull_request_count": { "description": "开启的pull request数", "type": "integer" }, "path": { "description": "完整仓库路径", "type": "string" }, "second_languages": { "description": "第二语言", "allOf": [ { "$ref": "#/definitions/dto.RepoLanguage" } ] }, "site": { "type": "string" }, "star_count": { "type": "integer" }, "status": { "allOf": [ { "$ref": "#/definitions/constant.RepoStatus" } ], "readOnly": true }, "tags": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" } } } }, "topics": { "type": "string" }, "updated_at": { "type": "string" }, "visibility_level": { "$ref": "#/definitions/constant.Visibility" }, "web_url": { "type": "string" } } }, "dto.Slugs": { "type": "object", "properties": { "created_at": { "type": "string" }, "freeze": { "type": "boolean" }, "path": { "type": "string" }, "resource_id": { "type": "integer" }, "resource_type": { "$ref": "#/definitions/constant.SlugType" }, "root_freeze": { "type": "boolean" }, "root_id": { "type": "integer" }, "updated_at": { "type": "string" } } }, "dto.SpecialAmount": { "type": "object", "properties": { "compute_build_corehour": { "description": "云原生构建cpu核时", "type": "integer" }, "compute_build_desc": { "type": "string" }, "compute_build_expire": { "description": "过期时间时为 null 时永久有效", "type": "string" }, "compute_build_gpu_corehour": { "description": "云原生构建gpu核时", "type": "integer" }, "compute_build_gpu_desc": { "type": "string" }, "compute_build_gpu_expire": { "description": "过期时间时为 null 时永久有效", "type": "string" }, "compute_develop_corehour": { "description": "云原生开发cpu核时", "type": "integer" }, "compute_develop_desc": { "type": "string" }, "compute_develop_expire": { "description": "过期时间时为 null 时永久有效", "type": "string" }, "compute_develop_gpu_corehour": { "description": "云原生开发gpu核时", "type": "integer" }, "compute_develop_gpu_desc": { "type": "string" }, "compute_develop_gpu_expire": { "description": "过期时间时为 null 时永久有效", "type": "string" }, "storage_git_desc": { "type": "string" }, "storage_git_expire": { "description": "过期时间时为 null 时永久有效", "type": "string" }, "storage_git_gib": { "description": "git存储空间", "type": "integer" }, "storage_object_desc": { "type": "string" }, "storage_object_expire": { "description": "过期时间时为 null 时永久有效", "type": "string" }, "storage_object_gib": { "description": "对象存储空间", "type": "integer" } } }, "dto.Stage": { "type": "object", "properties": { "duration": { "description": "stage 耗时", "type": "integer" }, "id": { "description": "stage id", "type": "string" }, "status": { "description": "stage 状态", "type": "string" } } }, "dto.StarUser": { "type": "object", "properties": { "avatar": { "type": "string" }, "created_at": { "type": "string" }, "email": { "type": "string" }, "freeze": { "type": "boolean" }, "id": { "type": "string" }, "is_follow": { "type": "boolean" }, "locked": { "type": "boolean" }, "nickname": { "type": "string" }, "stared_at": { "type": "string" }, "type": { "$ref": "#/definitions/constant.UserType" }, "username": { "type": "string" }, "verified": { "description": "认证类型", "type": "integer" }, "verified_expire_in": { "description": "认证过期时间", "type": "string" } } }, "dto.StartBuildReq": { "type": "object", "properties": { "branch": { "description": "触发分支,默认为主分支", "type": "string" }, "config": { "description": "指定配置文件内容,yaml 格式", "type": "string" }, "env": { "description": "环境变量,对象格式", "type": "object", "additionalProperties": { "type": "string" } }, "event": { "description": "事件名,必须是 api_trigger 或以 api_trigger_ 开头,默认为 `api_trigger`", "type": "string" }, "sha": { "description": "commit id ,优先级比 tag 高,默认为分支最新提交记录", "type": "string" }, "sync": { "description": "是否等待构建正式触发,为false时会立刻返回 sn 和 buildLogUrl", "type": "string" }, "tag": { "description": "触发 tag,优先级比 branch 高", "type": "string" } } }, "dto.StartWorkspaceReq": { "type": "object", "properties": { "branch": { "description": "分支名或 tag 名,例如:main 或 v1.0.0。", "type": "string" }, "ref": { "description": "Git ref,例如,refs/heads/main 或 refs/tags/v1.0.0。不传 ref 时默认基于分支启动", "type": "string" } } }, "dto.StartWorkspaceResult": { "type": "object", "properties": { "buildLogUrl": { "description": "仅新创建开发环境时返回,表示创建开发环境的流水线日志地址", "type": "string" }, "message": { "description": "仅新创建开发环境时返回,表示创建开发环境的提示信息", "type": "string" }, "sn": { "description": "仅新创建开发环境时返回,表示创建开发环境的流水线 sn", "type": "string" }, "url": { "description": "如果存在开发环境,则返回 WebIDE 访问 url;如果不存在开发环境,则返回启动云原生开发的 loading 页面 url 地址", "type": "string" } } }, "dto.Tag": { "type": "object", "properties": { "cargo": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } }, "composer": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } }, "conan": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } }, "docker": { "type": "array", "items": { "$ref": "#/definitions/dto.ContainerTag" } }, "docker_model": { "type": "array", "items": { "$ref": "#/definitions/dto.DockerModelTag" } }, "helm": { "type": "array", "items": { "$ref": "#/definitions/dto.ChartTag" } }, "maven": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } }, "npm": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } }, "nuget": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } }, "ohpm": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } }, "package": { "type": "string" }, "pypi": { "type": "array", "items": { "$ref": "#/definitions/dto.CommonRegistryTag" } } } }, "dto.TagDetail": { "type": "object", "properties": { "cargo": { "$ref": "#/definitions/dto.CommonRegistryTagDetail" }, "composer": { "$ref": "#/definitions/dto.CommonRegistryTagDetail" }, "conan": { "$ref": "#/definitions/dto.ConanRegistryTagDetail" }, "docker": { "$ref": "#/definitions/dto.ContainerTagDetail" }, "docker_model": { "$ref": "#/definitions/dto.DockerModelTagDetail" }, "helm": { "$ref": "#/definitions/dto.ChartTagDetail" }, "maven": { "$ref": "#/definitions/dto.CommonRegistryTagDetail" }, "npm": { "$ref": "#/definitions/dto.CommonRegistryTagDetail" }, "nuget": { "$ref": "#/definitions/dto.CommonRegistryTagDetail" }, "ohpm": { "$ref": "#/definitions/dto.CommonRegistryTagDetail" }, "pypi": { "$ref": "#/definitions/dto.PyPIRegistryTagDetail" } } }, "dto.TransferSlugReq": { "type": "object", "properties": { "source": { "type": "string" }, "target": { "type": "string" } } }, "dto.UpdateGroupReq": { "type": "object", "properties": { "description": { "type": "string" }, "domain": { "type": "string" }, "email": { "type": "string" }, "readme_repo_id": { "type": "integer" }, "readme_repo_path": { "type": "string" }, "remark": { "type": "string" }, "site": { "type": "string" }, "wechat_mp": { "type": "string" } } }, "dto.UpdateMembersRequest": { "type": "object", "properties": { "access_level": { "type": "string" }, "is_outside_collaborator": { "type": "boolean" } } }, "dto.UpdateUserInfoPayload": { "type": "object", "properties": { "address": { "type": "string" }, "bio": { "type": "string" }, "company": { "type": "string" }, "location": { "type": "string" }, "name": { "type": "string" }, "nickname": { "type": "string" }, "readme_repo_id": { "type": "integer" }, "readme_repo_path": { "type": "string" }, "site": { "type": "string" }, "wechat_mp": { "type": "string" }, "wechat_mp_qrcode": { "type": "string" } } }, "dto.UploadAssetsResponse": { "type": "object", "properties": { "assets": { "$ref": "#/definitions/dto.Assets" }, "form": { "type": "object", "additionalProperties": { "type": "string" } }, "token": { "description": "后续调用 confirm 接口用的", "type": "string" }, "upload_url": { "type": "string" } } }, "dto.UploadBadgeReq": { "type": "object", "properties": { "key": { "description": "徽章 key。目前允许上传的 key 包括:security/tca", "type": "string" }, "latest": { "description": "是否上传 latest 徽章。默认为 false:不上传 latest,仅上传 commitid 对应的徽章;true:上传 latest 和 commitid 对应的徽章", "type": "boolean" }, "link": { "description": "点击徽章右侧的跳转链接", "type": "string" }, "message": { "description": "徽章右侧显示内容", "type": "string" }, "sha": { "description": "commit id", "type": "string" }, "value": { "description": "徽章数值,不传默认用 message 代替", "type": "integer" } } }, "dto.UploadBadgeResult": { "type": "object", "properties": { "latest_url": { "description": "latest 对应的徽章 url 地址。如果没有传 latest: true,则该字段为空字符串", "type": "string" }, "url": { "description": "commitid 对应的徽章 url 地址", "type": "string" } } }, "dto.UploadRequestParams": { "type": "object", "properties": { "ext": { "type": "object", "additionalProperties": { "type": "string" } }, "name": { "type": "string" }, "size": { "type": "integer" } } }, "dto.UserFollowResult": { "type": "object", "properties": { "freeze": { "type": "boolean" }, "is_following": { "description": "查询人是否follow了此用户", "type": "boolean" }, "locked": { "type": "boolean" }, "nickname": { "type": "string" }, "username": { "type": "string" } } }, "dto.Users": { "type": "object", "properties": { "avatar": { "type": "string" }, "created_at": { "type": "string" }, "email": { "type": "string" }, "freeze": { "type": "boolean" }, "id": { "type": "string" }, "locked": { "type": "boolean" }, "nickname": { "type": "string" }, "type": { "$ref": "#/definitions/constant.UserType" }, "username": { "type": "string" }, "verified": { "description": "认证类型", "type": "integer" }, "verified_expire_in": { "description": "认证过期时间", "type": "string" } } }, "dto.UsersResult": { "type": "object", "properties": { "address": { "type": "string" }, "appreciate_status": { "description": "用户赞赏码状态,0-无赞赏码,1-有", "type": "integer" }, "avatar": { "type": "string" }, "bio": { "type": "string" }, "company": { "type": "string" }, "created_at": { "type": "string" }, "email": { "type": "string" }, "follow_count": { "type": "integer" }, "follow_mission_count": { "type": "integer" }, "follow_repo_count": { "type": "integer" }, "follower_count": { "type": "integer" }, "freeze": { "type": "boolean" }, "gender": { "type": "integer" }, "group_count": { "type": "integer" }, "id": { "type": "string" }, "is_following": { "description": "查询人是否follow了此用户", "type": "boolean" }, "location": { "type": "string" }, "locked": { "type": "boolean" }, "mission_count": { "type": "integer" }, "nickname": { "type": "string" }, "public_mission_count": { "type": "integer" }, "public_registry_count": { "type": "integer" }, "public_repo_count": { "type": "integer" }, "readme_repo_path": { "type": "string", "readOnly": true }, "registry_count": { "type": "integer" }, "repo_count": { "type": "integer" }, "reward_amount": { "type": "integer" }, "reward_count": { "type": "integer" }, "site": { "type": "string" }, "stars_count": { "type": "integer" }, "type": { "$ref": "#/definitions/constant.UserType" }, "username": { "type": "string" }, "verified": { "description": "认证类型", "type": "integer" }, "verified_expire_in": { "description": "认证过期时间", "type": "string" }, "wechat_mp": { "type": "string" }, "wechat_mp_qrcode": { "type": "string" } } }, "dto.UsersResultForSelf": { "type": "object", "properties": { "address": { "type": "string" }, "appearance": { "type": "string" }, "appreciate_status": { "description": "用户赞赏码状态,0-无赞赏码,1-有", "type": "integer" }, "avatar": { "type": "string" }, "bio": { "type": "string" }, "company": { "type": "string" }, "created_at": { "type": "string" }, "editable": { "$ref": "#/definitions/constant.UserEditable" }, "email": { "type": "string" }, "follow_count": { "type": "integer" }, "follow_mission_count": { "type": "integer" }, "follow_repo_count": { "type": "integer" }, "follower_count": { "type": "integer" }, "freeze": { "type": "boolean" }, "gender": { "type": "integer" }, "group_count": { "type": "integer" }, "id": { "type": "string" }, "language": { "type": "string" }, "last_login_at": { "type": "string" }, "last_login_ip": { "type": "string" }, "location": { "type": "string" }, "locked": { "type": "boolean" }, "mission_count": { "type": "integer" }, "next_updated_name_at": { "type": "string" }, "nickname": { "type": "string" }, "public_mission_count": { "type": "integer" }, "public_registry_count": { "type": "integer" }, "public_repo_count": { "type": "integer" }, "readme_repo_path": { "type": "string", "readOnly": true }, "registry_count": { "type": "integer" }, "repo_count": { "type": "integer" }, "reward_amount": { "type": "integer" }, "reward_count": { "type": "integer" }, "site": { "type": "string" }, "stars_count": { "type": "integer" }, "type": { "$ref": "#/definitions/constant.UserType" }, "updated_name_at": { "type": "string" }, "updated_nick_at": { "type": "string" }, "username": { "type": "string" }, "verified": { "description": "认证类型", "type": "integer" }, "verified_expire_in": { "description": "认证过期时间", "type": "string" }, "wechat_mp": { "type": "string" }, "wechat_mp_qrcode": { "type": "string" } } }, "dto.UsersWithAccessLevelInSlug": { "type": "object", "properties": { "access_level": { "$ref": "#/definitions/constant.AccessRole" }, "avatar": { "type": "string" }, "created_at": { "type": "string" }, "email": { "type": "string" }, "email_verification": { "type": "string" }, "freeze": { "type": "boolean" }, "id": { "type": "string" }, "inviter": { "$ref": "#/definitions/dto.Users" }, "join_time": { "type": "string" }, "locked": { "type": "boolean" }, "nickname": { "type": "string" }, "type": { "$ref": "#/definitions/constant.UserType" }, "username": { "type": "string" }, "verified": { "description": "认证类型", "type": "integer" }, "verified_expire_in": { "description": "认证过期时间", "type": "string" } } }, "dto.WorkspaceDeleteReq": { "type": "object", "properties": { "pipelineId": { "description": "表示要删除的开发环境流水线 id,sn 和 pipelineId 二选一,优先使用 pipelineId", "type": "string" }, "sn": { "description": "表示要删除的开发环境流水线构建号,sn 和 pipelineId 二选一,优先使用 pipelineId", "type": "string" } } }, "dto.WorkspaceDeleteResult": { "type": "object", "properties": { "code": { "description": "返回码,0 表示成功,1 表示失败", "type": "integer" }, "message": { "description": "描述", "type": "string" } } }, "dto.WorkspaceDetailResult": { "type": "object", "properties": { "codebuddy": { "description": "CodeBuddy 国际版客户端 remote-ssh 访问 schema 地址", "type": "string" }, "codebuddycn": { "description": "CodeBuddy 国内版客户端 remote-ssh 访问 schema 地址", "type": "string" }, "cursor": { "description": "Cursor 客户端 remote-ssh 访问 schema 地址", "type": "string" }, "jetbrains": { "description": "jetbrains 系列 ide 的 jetbrains gateway 访问 schema 地址,环境内有安装 JetBrains 系列 ide 才会有", "type": "object", "additionalProperties": { "type": "string" } }, "jumpUrl": { "description": "选择入口页面 url", "type": "string" }, "remoteSsh": { "description": "remote-ssh 连接地址", "type": "string" }, "ssh": { "description": "ssh 登录命令", "type": "string" }, "vscode": { "description": "VSCode 客户端 remote-ssh 访问 schema 地址", "type": "string" }, "vscode-insiders": { "description": "Vscode 预览版客户端 remote-ssh 访问 schema 地址", "type": "string" }, "webide": { "description": "WebIDE 访问 url", "type": "string" } } }, "dto.WorkspaceInfo": { "type": "object", "properties": { "branch": { "description": "分支名,例如:main", "type": "string" }, "commit_count": { "description": "备份的 commit 数", "type": "integer" }, "create_time": { "description": "开发环境创建时间,例如:2024-12-02T03:20:22.000Z", "type": "string" }, "duration": { "description": "开发环境持续时间,单位:ms(非实时更新)", "type": "integer" }, "file_count": { "description": "备份的文件数", "type": "integer" }, "file_list": { "description": "备份的文件列表,仅前五个备份文件相对路径", "type": "string" }, "latest_sha": { "description": "环境销毁时远程最新的 commit short hash", "type": "string" }, "pipeline_id": { "description": "创建环境的子流水线 id", "type": "string" }, "remote_stash_count": { "description": "备份的 stash 数", "type": "integer" }, "repo_url": { "description": "仓库地址", "type": "string" }, "restore_id": { "description": "恢复备份代码的流水线 id,如果有值表示备份代码已被恢复(重建环境时会恢复备份代码)", "type": "string" }, "slug": { "description": "仓库路径,例如:groupname/reponame", "type": "string" }, "sn": { "description": "创建开发环境的流水线 sn", "type": "string" }, "ssh": { "description": "开发环境是否支持 ssh 链接", "type": "boolean" }, "status": { "description": "工作区状态,running: 开发环境已启动,closed:开发环境已关闭", "type": "string" }, "workspace": { "description": "开发环境默认工作区路径", "type": "string" } } }, "dto.WorkspaceListResult": { "type": "object", "properties": { "hasMore": { "description": "是否有更多数据", "type": "boolean" }, "list": { "description": "云原生开发环境列表", "type": "array", "items": { "$ref": "#/definitions/dto.WorkspaceInfo" } }, "pageInfo": { "description": "分页信息", "allOf": [ { "$ref": "#/definitions/dto.WorkspacePageInfo" } ] }, "total": { "description": "总数", "type": "integer" } } }, "dto.WorkspacePageInfo": { "type": "object", "properties": { "page": { "type": "integer" }, "pageSize": { "type": "integer" } } }, "dto.WorkspaceStopReq": { "type": "object", "properties": { "pipelineId": { "description": "表示要停止的开发环境的流水线 id,sn 和 pipelineId 二选一,优先使用 pipelineId", "type": "string" }, "sn": { "description": "表示要停止的开发环境流水线构建号,sn 和 pipelineId 二选一,优先使用 pipelineId", "type": "string" } } }, "dto.WorkspaceStopResult": { "type": "object", "properties": { "buildLogUrl": { "description": "表示停止的开发环境流水线日志地址", "type": "string" }, "message": { "description": "表示操作结果提示信息", "type": "string" }, "sn": { "description": "表示停止的开发环境流水线构建号", "type": "string" } } }, "flags.Repo": { "description": "仓库特性标记,内容为枚举的组合,英文逗号分割", "type": "string", "enum": [ "Unknown", "KnowledgeBase" ], "x-enum-comments": { "KnowledgeBase": "KnowledgeBase 知识库", "Unknown": "Unknown 未知" }, "x-enum-descriptions": [ "Unknown 未知", "KnowledgeBase 知识库" ], "x-enum-varnames": [ "Unknown", "KnowledgeBase" ] }, "git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.CommitStatus": { "type": "object", "properties": { "context": { "description": "提交状态上下文标识符。", "type": "string" }, "created_at": { "description": "创建时间。", "type": "string" }, "description": { "description": "提交状态描述信息。", "type": "string" }, "state": { "description": "提交状态。枚举值:`pending`,`success`,`failure`,`error`,`skip`", "type": "string" }, "target_url": { "description": "提交状态详情链接。", "type": "string" }, "updated_at": { "description": "更新时间。", "type": "string" } } }, "git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo": { "type": "object", "properties": { "email": { "description": "用户邮箱。", "type": "string" }, "freeze": { "description": "是否冻结。", "type": "boolean" }, "nickname": { "description": "昵称。", "type": "string" }, "username": { "description": "用户名。", "type": "string" } } }, "git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.CommitStatus": { "type": "object", "properties": { "context": { "type": "string" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "state": { "type": "string" }, "target_url": { "type": "string" }, "updated_at": { "type": "string" } } }, "git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo": { "type": "object", "properties": { "nickname": { "type": "string" }, "username": { "type": "string" } } }, "openapi.CommitAssetUploadURL": { "type": "object", "properties": { "expires_in_sec": { "description": "URL过期时间,单位为秒。", "type": "integer" }, "upload_url": { "description": "附件上传URL。", "type": "string" }, "verify_url": { "description": "附件上传确认URL。", "type": "string" } } }, "openapi.CreateBranchForm": { "type": "object", "properties": { "name": { "description": "新分支的名称。", "type": "string" }, "start_point": { "description": "新分支的起始点。格式:`分支名称`,`提交哈希`,`标签名称`", "type": "string" } } }, "openapi.HeadRef": { "type": "object", "properties": { "name": { "type": "string" }, "protected": { "type": "boolean" } } }, "openapi.IssuePropertiesForm": { "type": "object", "properties": { "properties": { "type": "array", "items": { "$ref": "#/definitions/openapi.PropertyForm" } } } }, "openapi.PatchReleaseForm": { "type": "object", "properties": { "body": { "description": "版本描述。", "type": "string" }, "draft": { "description": "是否为草稿版本。", "type": "boolean" }, "make_latest": { "description": "是否设置为最新版本。可选值:`true`,`false`,`legacy`", "type": "string" }, "name": { "description": "版本标题。", "type": "string" }, "prerelease": { "description": "是否为预发布版本。", "type": "boolean" } } }, "openapi.PostCommitAssetUploadURLForm": { "type": "object", "properties": { "asset_name": { "description": "附件名称", "type": "string" }, "size": { "description": "附件大小,单位为字节。 Attachment size, in bytes.", "type": "integer" }, "ttl": { "description": "附件存在时间,单位为天", "type": "integer" } } }, "openapi.PostReleaseAssetUploadURLForm": { "type": "object", "properties": { "asset_name": { "description": "附件名称。", "type": "string" }, "overwrite": { "description": "是否覆盖同名附件。", "type": "boolean" }, "size": { "description": "附件大小,单位为字节。", "type": "integer" }, "ttl": { "description": "附件存在时间,单位为天", "type": "integer" } } }, "openapi.PostReleaseForm": { "type": "object", "properties": { "body": { "description": "版本描述。", "type": "string" }, "draft": { "description": "是否为草稿版本。", "type": "boolean" }, "make_latest": { "description": "是否设置为最新版本。可选值:`true`,`false`,`legacy`", "type": "string" }, "name": { "description": "版本标题。", "type": "string" }, "prerelease": { "description": "是否为预发布版本。", "type": "boolean" }, "tag_name": { "description": "标签名称。", "type": "string" }, "target_commitish": { "description": "目标提交哈希或分支名称。", "type": "string" } } }, "openapi.PropertyForm": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "openapi.PutCommitAnnotation": { "type": "object", "properties": { "key": { "description": "元数据键名。", "type": "string" }, "value": { "description": "元数据值。", "type": "string" } } }, "openapi.PutCommitAnnotationsForm": { "type": "object", "properties": { "annotations": { "description": "提交元数据列表。", "type": "array", "items": { "$ref": "#/definitions/openapi.PutCommitAnnotation" } } } }, "openapi.PutTagAnnotation": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "openapi.PutTagAnnotationsForm": { "type": "object", "properties": { "annotations": { "type": "array", "items": { "$ref": "#/definitions/openapi.PutTagAnnotation" } } } }, "openapi.ReleaseAssetUploadURL": { "type": "object", "properties": { "expires_in_sec": { "description": "URL过期时间,单位为秒。", "type": "integer" }, "upload_url": { "description": "附件上传URL。", "type": "string" }, "verify_url": { "description": "附件上传确认验证URL。", "type": "string" } } }, "organization.SettingValue": { "description": "配置值,内容为枚举的组合,英文逗号分割", "type": "string", "enum": [ "disable_organization_readme", "cloud_native_dev_only", "user_root_group_branch_protection_only", "forbid_redefine_branch_protection", "enable_tapd_access", "enable_show_private_mission_water_mark", "prevent_organization_creation", "prevent_repository_creation", "prevent_mission_creation", "prevent_registry_creation", "disable_invitation", "prevent_visibility_modification", "prevent_resource_deletion", "prevent_repository_archival", "prevent_organization_transfer", "prevent_repository_transfer", "prevent_mission_transfer", "prevent_registry_transfer", "use_group_git_quota", "use_group_git_object_limit", "enable_add_member_only_root", "use_root_group_git_push_limit", "enable_add_member", "enable_change_member_role_only_root" ], "x-enum-comments": { "CloudNativeDevOnly": "CloudNativeDevOnly 仅可使用云原生开发, 以组织设置为准", "DisableInvitation": "DisableInvitation 禁止邀请成员", "DisableOrganizationReadme": "DisableOrganizationReadme 是否关闭组织介绍页, 以组织设置为准", "EnableShowPrivateMissionWaterMark": "EnableShowPrivateMissionWaterMark 打开后,私有任务集会显示水印", "EnableTAPDAccess": "EnableTAPDAccess 打开后,允许 TAPD 访问组织下的资源, 以组织设置为准", "ForbidRedefineBranchProtection": "ForbidRedefineBranchProtection 打开后,禁止仓库修改保护分支规则,以根组织设置为准", "PreventMissionCreation": "PreventMissionCreation 禁止创建任务集", "PreventMissionTransfer": "PreventMissionTransfer 禁止转移任务集", "PreventOrganizationCreation": "PreventOrganizationCreation 禁止创建组织", "PreventOrganizationTransfer": "PreventOrganizationTransfer 禁止转移组织", "PreventRegistryCreation": "PreventRegistryCreation 禁止创建制品库", "PreventRegistryTransfer": "PreventRegistryTransfer 禁止转移制品库", "PreventRepositoryArchival": "PreventRepositoryArchival 禁止归档仓库", "PreventRepositoryCreation": "PreventRepositoryCreation 禁止创建仓库", "PreventRepositoryTransfer": "PreventRepositoryTransfer 禁止转移仓库", "PreventResourceDeletion": "PreventResourceDeletion 禁止删除资源", "PreventVisibilityModification": "PreventVisibilityModification 禁止修改资源可见性", "UseGroupGitObjectLimit": "UseGroupGitObjectLimit 是否使用组织的仓库对象限制", "UseGroupGitQuota": "UseGroupGitQuota 是否使用组织的仓库配额", "UseRootGroupBranchProtectionOnly": "UseRootGroupBranchProtectionOnly 支持重写分支保护规则,打开时,如果保护分支规则有冲突的时候,可以覆盖根组织的规则", "UseRootGroupGitPushLimit": "UseRootGroupGitPushLimit 开启根组织推送限制选项", "enableAddMember": "enableAddMember 开启后, 允许子组织管理员和负责人添加成员到其负责的组织/仓库/制品库/任务集", "enableAddMemberOnlyRoot": "enableAddMemberOnlyRoot 开启后, 仅根组织管理员和负责人可添加成员加入根组织下所有子组织和仓库", "enableChangeMemberRoleOnlyRoot": "enableChangeMemberRoleOnlyRoot 开启后, 仅根组织管理员和负责人可修改成员角色" }, "x-enum-descriptions": [ "DisableOrganizationReadme 是否关闭组织介绍页, 以组织设置为准", "CloudNativeDevOnly 仅可使用云原生开发, 以组织设置为准", "UseRootGroupBranchProtectionOnly 支持重写分支保护规则,打开时,如果保护分支规则有冲突的时候,可以覆盖根组织的规则", "ForbidRedefineBranchProtection 打开后,禁止仓库修改保护分支规则,以根组织设置为准", "EnableTAPDAccess 打开后,允许 TAPD 访问组织下的资源, 以组织设置为准", "EnableShowPrivateMissionWaterMark 打开后,私有任务集会显示水印", "PreventOrganizationCreation 禁止创建组织", "PreventRepositoryCreation 禁止创建仓库", "PreventMissionCreation 禁止创建任务集", "PreventRegistryCreation 禁止创建制品库", "DisableInvitation 禁止邀请成员", "PreventVisibilityModification 禁止修改资源可见性", "PreventResourceDeletion 禁止删除资源", "PreventRepositoryArchival 禁止归档仓库", "PreventOrganizationTransfer 禁止转移组织", "PreventRepositoryTransfer 禁止转移仓库", "PreventMissionTransfer 禁止转移任务集", "PreventRegistryTransfer 禁止转移制品库", "UseGroupGitQuota 是否使用组织的仓库配额", "UseGroupGitObjectLimit 是否使用组织的仓库对象限制", "enableAddMemberOnlyRoot 开启后, 仅根组织管理员和负责人可添加成员加入根组织下所有子组织和仓库", "UseRootGroupGitPushLimit 开启根组织推送限制选项", "enableAddMember 开启后, 允许子组织管理员和负责人添加成员到其负责的组织/仓库/制品库/任务集", "enableChangeMemberRoleOnlyRoot 开启后, 仅根组织管理员和负责人可修改成员角色" ], "x-enum-varnames": [ "DisableOrganizationReadme", "CloudNativeDevOnly", "UseRootGroupBranchProtectionOnly", "ForbidRedefineBranchProtection", "EnableTAPDAccess", "EnableShowPrivateMissionWaterMark", "PreventOrganizationCreation", "PreventRepositoryCreation", "PreventMissionCreation", "PreventRegistryCreation", "DisableInvitation", "PreventVisibilityModification", "PreventResourceDeletion", "PreventRepositoryArchival", "PreventOrganizationTransfer", "PreventRepositoryTransfer", "PreventMissionTransfer", "PreventRegistryTransfer", "UseGroupGitQuota", "UseGroupGitObjectLimit", "enableAddMemberOnlyRoot", "UseRootGroupGitPushLimit", "enableAddMember", "enableChangeMemberRoleOnlyRoot" ] }, "web.Author": { "type": "object", "properties": { "email": { "type": "string" }, "user_name": { "type": "string" } } }, "web.CommitAnnotation": { "type": "object", "properties": { "key": { "description": "元数据键名。", "type": "string" }, "meta": { "description": "扩展元数据。", "type": "object", "additionalProperties": {} }, "value": { "description": "元数据值。", "type": "string" } } }, "web.CommitAnnotationInBatch": { "type": "object", "properties": { "annotations": { "description": "提交元数据列表。", "type": "array", "items": { "$ref": "#/definitions/web.CommitAnnotation" } }, "commit_hash": { "description": "提交哈希值。", "type": "string" } } }, "web.ContributorTrend": { "type": "object", "properties": { "author": { "description": "贡献者信息", "allOf": [ { "$ref": "#/definitions/web.Author" } ] }, "commit_count": { "description": "贡献者的总提交数", "type": "integer" }, "weeks": { "description": "贡献者以周为单位的提交趋势数据", "type": "array", "items": { "$ref": "#/definitions/web.Week" } } } }, "web.GetCommitAnnotationsInBatchForm": { "type": "object", "properties": { "commit_hashes": { "description": "提交哈希值列表。", "type": "array", "items": { "type": "string" } }, "keys": { "description": "元数据键列表。", "type": "array", "items": { "type": "string" } } } }, "web.Meta": { "type": "object", "properties": { "gen_branch": { "type": "string" }, "gen_hash": { "type": "string" }, "updated_at": { "type": "string" } } }, "web.RepoContribTrend": { "type": "object", "properties": { "meta": { "$ref": "#/definitions/web.Meta" }, "repo_data": { "type": "array", "items": { "$ref": "#/definitions/web.Week" } }, "user_total": { "type": "integer" }, "users_data": { "type": "array", "items": { "$ref": "#/definitions/web.ContributorTrend" } }, "week_total": { "type": "integer" }, "with_line_counts": { "description": "是否统计增删的行数, 默认总提交超过 10000 的仓库不统计", "type": "boolean" } } }, "web.TagAnnotation": { "type": "object", "properties": { "key": { "type": "string" }, "meta": { "type": "object", "additionalProperties": {} }, "value": { "type": "string" } } }, "web.Week": { "type": "object", "properties": { "a": { "description": "每周增加的行数", "type": "integer" }, "c": { "description": "每周的提交数量", "type": "integer" }, "d": { "description": "每周删除的行数", "type": "integer" }, "w": { "description": "周的时间戳", "type": "integer" } } } }, "securityDefinitions": { "BearerAuth": { "description": "Type \"Bearer 1Z1609lSrSizKnLxEWx6WLr3lvA\".", "type": "apiKey", "name": "Authorization", "in": "header" } } }