diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..7e2aeab
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1 @@
+this is a test page
\ No newline at end of file
diff --git a/docs/readme.md b/docs/readme.md
index e7a570d..1049fb1 100644
--- a/docs/readme.md
+++ b/docs/readme.md
@@ -3,4 +3,9 @@
### 代码同步
1. 从cnb同步到本地gitea
-2. 从本地gitea同步到cnb
\ No newline at end of file
+2. 从本地gitea同步到cnb
+
+
+
+## 启动环境
+https://docs.cnb.cool/zh/workspaces/custom-dev-env.html
\ No newline at end of file
diff --git a/src/workspace.ts b/src/workspace.ts
index ac21ad9..5077f5b 100644
--- a/src/workspace.ts
+++ b/src/workspace.ts
@@ -27,6 +27,10 @@ export interface ListParams {
status?: 'running' | 'closed';
}
+/**
+ * 云原生开发环境管理模块
+ * https://api.cnb.cool/#/operations/GetWorkspaceDetail
+ */
export class Workspace extends CNBCore {
constructor(token: string) {
super({ token });
@@ -137,8 +141,10 @@ export type ResultList = {
export interface WorkspaceInfo {
/** 分支名,例如:main */
branch: string;
+ /** 业务 ID */
+ business_id: string;
/** 备份的 commit 数 */
- commit_count: number;
+ commit_count: number | null;
/** 开发环境创建时间,例如:2024-12-02T03:20:22.000Z */
create_time: string;
/** 开发环境持续时间,单位:ms(非实时更新) */
@@ -147,24 +153,36 @@ export interface WorkspaceInfo {
file_count: number;
/** 备份的文件列表,仅前五个备份文件相对路径 */
file_list: string;
+ /** 是否为预览环境,0: 否,1: 是 */
+ is_preview: number;
+ /** JetBrains IDE 列表 */
+ jetbrainsList: any[];
/** 环境销毁时远程最新的 commit short hash */
- latest_sha: string;
+ latest_sha: string | null;
/** 创建环境的子流水线 id */
pipeline_id: string;
/** 备份的 stash 数 */
- remote_stash_count: number;
+ remote_stash_count: number | null;
+ /** 仓库 ID */
+ repo_id: string;
/** 仓库地址 */
repo_url: string;
/** 恢复备份代码的流水线 id,如果有值表示备份代码已被恢复(重建环境时会恢复备份代码) */
- restore_id: string;
+ restore_id: string | null;
+ /** 单个 stash 标识,1: 是,0: 否 */
+ single_stash: number;
/** 仓库路径,例如:groupname/reponame */
slug: string;
/** 创建开发环境的流水线 sn */
sn: string;
/** 开发环境是否支持 ssh 链接 */
ssh: boolean;
+ /** 本地 stash 数 */
+ stash_count: number;
/** 工作区状态,running: 开发环境已启动,closed:开发环境已关闭 */
status: string;
+ /** 用户名 */
+ user_name: string;
/** 开发环境默认工作区路径 */
workspace: string;
}
diff --git a/swagger.json b/swagger.json
deleted file mode 100644
index 522704a..0000000
--- a/swagger.json
+++ /dev/null
@@ -1,15781 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "contact": {
- "email": "cnb@tencent.com",
- "name": "Open API Support",
- "url": "https://docs.cnb.cool/"
- },
- "title": "CNB OPENAPI",
- "version": "1.0"
- },
- "definitions": {
- "api.Blob": {
- "properties": {
- "sha": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.Branch": {
- "properties": {
- "commit": {
- "properties": {
- "sha": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "name": {
- "type": "string"
- },
- "protected": {
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "api.BranchDetail": {
- "properties": {
- "commit": {
- "$ref": "#/definitions/api.Commit"
- },
- "dev_meta": {
- "items": {
- "type": "integer"
- },
- "type": "array"
- },
- "name": {
- "type": "string"
- },
- "protected": {
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "api.BranchProtection": {
- "properties": {
- "allow_creation": {
- "type": "boolean"
- },
- "allow_deletions": {
- "type": "boolean"
- },
- "allow_force_pushes": {
- "type": "boolean"
- },
- "allow_master_creation": {
- "type": "boolean"
- },
- "allow_master_deletions": {
- "type": "boolean"
- },
- "allow_master_force_pushes": {
- "type": "boolean"
- },
- "allow_master_manual_merge": {
- "type": "boolean"
- },
- "allow_master_pushes": {
- "type": "boolean"
- },
- "allow_pushes": {
- "type": "boolean"
- },
- "id": {
- "type": "string"
- },
- "required_approved_review_count": {
- "type": "integer"
- },
- "required_approved_review_ratio": {
- "type": "integer"
- },
- "required_linear_history": {
- "description": "RequiredCommitSignatures bool `json:\"required_commit_signatures\"`",
- "type": "boolean"
- },
- "required_master_approve": {
- "type": "boolean"
- },
- "required_must_auto_merge": {
- "type": "boolean"
- },
- "required_must_push_via_pull_request": {
- "type": "boolean"
- },
- "required_pull_request_reviews": {
- "type": "boolean"
- },
- "required_status_checks": {
- "type": "boolean"
- },
- "rule": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.Commit": {
- "properties": {
- "author": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo"
- },
- "commit": {
- "$ref": "#/definitions/api.CommitObject"
- },
- "committer": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo"
- },
- "parents": {
- "items": {
- "$ref": "#/definitions/api.CommitParent"
- },
- "type": "array"
- },
- "sha": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.CommitAsset": {
- "properties": {
- "author": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo"
- },
- "content_type": {
- "type": "string"
- },
- "created_at": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "size_in_byte": {
- "type": "integer"
- },
- "updated_at": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.CommitDiffFilePatch": {
- "properties": {
- "additions": {
- "type": "integer"
- },
- "deletions": {
- "type": "integer"
- },
- "mode": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "patch": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "previous_filename": {
- "type": "string"
- },
- "previous_mode": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.CommitObject": {
- "properties": {
- "author": {
- "$ref": "#/definitions/api.Signature"
- },
- "comment_count": {
- "type": "integer"
- },
- "committer": {
- "$ref": "#/definitions/api.Signature"
- },
- "message": {
- "type": "string"
- },
- "tree": {
- "$ref": "#/definitions/api.CommitObjectTree"
- },
- "verification": {
- "$ref": "#/definitions/api.CommitObjectVerification"
- }
- },
- "type": "object"
- },
- "api.CommitObjectTree": {
- "properties": {
- "sha": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.CommitObjectVerification": {
- "properties": {
- "payload": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- },
- "signature": {
- "type": "string"
- },
- "verified": {
- "type": "boolean"
- },
- "verified_at": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.CommitParent": {
- "properties": {
- "sha": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.CommitStatuses": {
- "properties": {
- "sha": {
- "type": "string"
- },
- "state": {
- "type": "string"
- },
- "statuses": {
- "items": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.CommitStatus"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "api.CompareResponse": {
- "properties": {
- "base_commit": {
- "$ref": "#/definitions/api.Commit"
- },
- "commits": {
- "items": {
- "$ref": "#/definitions/api.Commit"
- },
- "type": "array"
- },
- "files": {
- "items": {
- "$ref": "#/definitions/api.CommitDiffFilePatch"
- },
- "type": "array"
- },
- "head_commit": {
- "$ref": "#/definitions/api.Commit"
- },
- "merge_base_commit": {
- "$ref": "#/definitions/api.Commit"
- },
- "total_commits": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "api.Content": {
- "properties": {
- "content": {
- "type": "string"
- },
- "encoding": {
- "type": "string"
- },
- "entries": {
- "items": {
- "$ref": "#/definitions/api.TreeEntry"
- },
- "type": "array"
- },
- "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"
- }
- },
- "type": "object"
- },
- "api.DeleteIssueAssigneesForm": {
- "properties": {
- "assignees": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "api.DeletePullAssigneesForm": {
- "properties": {
- "assignees": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "api.DiffLine": {
- "properties": {
- "content": {
- "type": "string"
- },
- "left_line_number": {
- "type": "integer"
- },
- "prefix": {
- "type": "string"
- },
- "right_line_number": {
- "type": "integer"
- },
- "type": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.Issue": {
- "properties": {
- "assignees": {
- "items": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo"
- },
- "type": "array"
- },
- "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": {
- "items": {
- "$ref": "#/definitions/api.Label"
- },
- "type": "array"
- },
- "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"
- }
- },
- "type": "object"
- },
- "api.IssueComment": {
- "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"
- }
- },
- "type": "object"
- },
- "api.IssueDetail": {
- "properties": {
- "assignees": {
- "items": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo"
- },
- "type": "array"
- },
- "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": {
- "items": {
- "$ref": "#/definitions/api.Label"
- },
- "type": "array"
- },
- "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"
- }
- },
- "type": "object"
- },
- "api.Label": {
- "properties": {
- "color": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.MergePullRequest": {
- "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"
- }
- },
- "type": "object"
- },
- "api.MergePullResponse": {
- "properties": {
- "merged": {
- "type": "boolean"
- },
- "message": {
- "type": "string"
- },
- "sha": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PatchIssueAssigneesForm": {
- "properties": {
- "assignees": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "api.PatchIssueCommentForm": {
- "properties": {
- "body": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PatchIssueForm": {
- "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"
- }
- },
- "type": "object"
- },
- "api.PatchLabelForm": {
- "properties": {
- "color": {
- "description": "The hexadecimal color code for the label, without the leading `#`.",
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "new_name": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PatchPullCommentForm": {
- "properties": {
- "body": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PatchPullRequest": {
- "properties": {
- "body": {
- "type": "string"
- },
- "state": {
- "description": "State of this Pull Request. Either `open` or `closed`.",
- "type": "string"
- },
- "title": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PipelineSettings": {
- "properties": {
- "auto_trigger": {
- "type": "boolean"
- },
- "forked_repo_auto_trigger": {
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "api.PostBlobForm": {
- "properties": {
- "content": {
- "type": "string"
- },
- "encoding": {
- "description": "当前编码只支持 `\"utf-8\"` and `\"base64\"` 。默认: `utf-8`",
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PostIssueAssigneesForm": {
- "properties": {
- "assignees": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "api.PostIssueCommentForm": {
- "properties": {
- "body": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PostIssueForm": {
- "properties": {
- "assignees": {
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "body": {
- "type": "string"
- },
- "end_date": {
- "type": "string"
- },
- "labels": {
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "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"
- }
- },
- "type": "object"
- },
- "api.PostIssueLabelsForm": {
- "properties": {
- "labels": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "api.PostLabelForm": {
- "properties": {
- "color": {
- "description": "The hexadecimal color code for the label, without the leading `#`.",
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PostPullAssigneesForm": {
- "properties": {
- "assignees": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "api.PostPullLabelsForm": {
- "properties": {
- "labels": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "api.PostTagFrom": {
- "properties": {
- "message": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "target": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.Pull": {
- "properties": {
- "base": {
- "$ref": "#/definitions/api.PullRef"
- },
- "blocked_on": {
- "type": "string"
- },
- "body": {
- "type": "string"
- },
- "head": {
- "$ref": "#/definitions/api.PullRef"
- },
- "is_wip": {
- "type": "boolean"
- },
- "merged_by": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo"
- },
- "number": {
- "type": "string"
- },
- "reviewers": {
- "items": {
- "$ref": "#/definitions/api.PullReviewer"
- },
- "type": "array"
- },
- "state": {
- "type": "string"
- },
- "title": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PullCommentCreationForm": {
- "properties": {
- "body": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PullCreationForm": {
- "properties": {
- "base": {
- "type": "string"
- },
- "body": {
- "type": "string"
- },
- "head": {
- "type": "string"
- },
- "head_repo": {
- "type": "string"
- },
- "title": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PullFile": {
- "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"
- }
- },
- "type": "object"
- },
- "api.PullRef": {
- "properties": {
- "ref": {
- "type": "string"
- },
- "repo": {
- "$ref": "#/definitions/api.Repo"
- },
- "sha": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PullRefInfo": {
- "properties": {
- "ref": {
- "type": "string"
- },
- "repo": {
- "$ref": "#/definitions/api.RepoInfo"
- },
- "sha": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PullRequest": {
- "properties": {
- "assignees": {
- "items": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo"
- },
- "type": "array"
- },
- "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"
- },
- "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"
- }
- },
- "type": "object"
- },
- "api.PullRequestComment": {
- "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"
- }
- },
- "type": "object"
- },
- "api.PullRequestInfo": {
- "properties": {
- "assignees": {
- "items": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo"
- },
- "type": "array"
- },
- "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"
- },
- "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": {
- "items": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo"
- },
- "type": "array"
- },
- "state": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PullRequestSettings": {
- "properties": {
- "allow_merge_commit_merge": {
- "type": "boolean"
- },
- "allow_rebase_merge": {
- "type": "boolean"
- },
- "allow_squash_merge": {
- "type": "boolean"
- },
- "master_auto_as_reviewer": {
- "type": "boolean"
- },
- "merge_commit_message_style": {
- "type": "string"
- },
- "squash_commit_message_style": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PullReview": {
- "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"
- }
- },
- "type": "object"
- },
- "api.PullReviewComment": {
- "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": {
- "items": {
- "$ref": "#/definitions/api.DiffLine"
- },
- "type": "array"
- },
- "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"
- }
- },
- "type": "object"
- },
- "api.PullReviewCommentCreationForm": {
- "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"
- }
- },
- "type": "object"
- },
- "api.PullReviewCreationForm": {
- "properties": {
- "body": {
- "type": "string"
- },
- "comments": {
- "items": {
- "$ref": "#/definitions/api.PullReviewCommentCreationForm"
- },
- "type": "array"
- },
- "event": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PullReviewer": {
- "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"
- }
- },
- "type": "object"
- },
- "api.PushLimitSettings": {
- "properties": {
- "allow_single_push_number": {
- "type": "integer"
- },
- "check_single_push_number": {
- "type": "boolean"
- },
- "only_master_can_push_tag": {
- "type": "boolean"
- },
- "push_commit_must_be": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.PutIssueLabelsForm": {
- "properties": {
- "labels": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "api.PutPullLabelsForm": {
- "properties": {
- "labels": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "api.Release": {
- "properties": {
- "assets": {
- "items": {
- "$ref": "#/definitions/api.ReleaseAsset"
- },
- "type": "array"
- },
- "author": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo"
- },
- "body": {
- "type": "string"
- },
- "created_at": {
- "type": "string"
- },
- "draft": {
- "type": "boolean"
- },
- "id": {
- "type": "string"
- },
- "is_latest": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "prerelease": {
- "type": "boolean"
- },
- "published_at": {
- "type": "string"
- },
- "tag_commitish": {
- "type": "string"
- },
- "tag_name": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.ReleaseAsset": {
- "properties": {
- "content_type": {
- "type": "string"
- },
- "created_at": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "size": {
- "type": "integer"
- },
- "updated_at": {
- "type": "string"
- },
- "uploader": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo"
- }
- },
- "type": "object"
- },
- "api.Repo": {
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "web_url": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.RepoInfo": {
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "web_url": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.Signature": {
- "properties": {
- "date": {
- "type": "string"
- },
- "email": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.Tag": {
- "properties": {
- "commit": {
- "$ref": "#/definitions/api.Commit"
- },
- "name": {
- "type": "string"
- },
- "target": {
- "type": "string"
- },
- "target_type": {
- "type": "string"
- },
- "verification": {
- "$ref": "#/definitions/api.TagObjectVerification"
- }
- },
- "type": "object"
- },
- "api.TagObjectVerification": {
- "properties": {
- "payload": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- },
- "signature": {
- "type": "string"
- },
- "verified": {
- "type": "boolean"
- },
- "verified_at": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "api.TreeEntry": {
- "properties": {
- "name": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "sha": {
- "type": "string"
- },
- "type": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "chart.Dependency": {
- "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.",
- "items": {},
- "type": "array"
- },
- "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",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "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"
- }
- },
- "type": "object"
- },
- "chart.Maintainer": {
- "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"
- }
- },
- "type": "object"
- },
- "chart.Metadata": {
- "properties": {
- "annotations": {
- "additionalProperties": {
- "type": "string"
- },
- "description": "Annotations are additional mappings uninterpreted by Helm,\nmade available for inspection by other applications.",
- "type": "object"
- },
- "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.",
- "items": {
- "$ref": "#/definitions/chart.Dependency"
- },
- "type": "array"
- },
- "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",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "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)",
- "items": {
- "$ref": "#/definitions/chart.Maintainer"
- },
- "type": "array"
- },
- "name": {
- "description": "The name of the chart. Required.",
- "type": "string"
- },
- "sources": {
- "description": "Source is the URL to the source code of this chart",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "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"
- }
- },
- "type": "object"
- },
- "constant.AccessRole": {
- "enum": [
- 0,
- 10,
- 20,
- 30,
- 40,
- 50
- ],
- "type": "integer",
- "x-enum-varnames": [
- "Anonymous",
- "Guest",
- "REPORTER",
- "DEVELOPER",
- "MASTER",
- "OWNER"
- ]
- },
- "constant.RepoDisplayModule": {
- "enum": [
- 1,
- 2,
- 4
- ],
- "type": "integer",
- "x-enum-varnames": [
- "RepoHideRelease",
- "RepoHideContributors",
- "RepoHideActivity"
- ]
- },
- "constant.RepoStatus": {
- "enum": [
- 0,
- 1,
- 2
- ],
- "type": "integer",
- "x-enum-varnames": [
- "RepoStatusOK",
- "RepoStatusArchived",
- "RepoStatusForking"
- ]
- },
- "constant.SlugType": {
- "enum": [
- 0,
- 1,
- 2,
- 3,
- 4
- ],
- "type": "integer",
- "x-enum-varnames": [
- "SlugTypeGroup",
- "SlugTypeRepo",
- "SlugTypeMission",
- "SlugTypeRegistry",
- "SlugTypeUnknown"
- ]
- },
- "constant.UserEditable": {
- "enum": [
- 1,
- 2,
- 4,
- 8,
- 16,
- 32
- ],
- "type": "integer",
- "x-enum-varnames": [
- "UserEmailEditable",
- "UserNickEditable",
- "UserNameEditable",
- "UserAvatarEditable",
- "UserLogOffEditable",
- "UserSyncNickAvatarEditable"
- ]
- },
- "constant.UserType": {
- "enum": [
- 0,
- 1,
- 2,
- 3
- ],
- "type": "integer",
- "x-enum-varnames": [
- "WeChatUser",
- "OauthUser",
- "TestUser",
- "RobotUser"
- ]
- },
- "constant.Visibility": {
- "enum": [
- 0,
- 10,
- 20
- ],
- "type": "integer",
- "x-enum-varnames": [
- "VisibilityPrivate",
- "VisibilityPublic",
- "VisibilitySecret"
- ]
- },
- "convert.NullTime": {
- "properties": {
- "time": {
- "type": "string"
- },
- "valid": {
- "description": "Valid is true if Time is not NULL",
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "die.WebError": {
- "properties": {
- "errcode": {
- "type": "integer"
- },
- "errmsg": {
- "type": "string"
- },
- "errparam": {
- "additionalProperties": {},
- "type": "object"
- }
- },
- "type": "object"
- },
- "dto.ActivityCreateRepoDetail": {
- "properties": {
- "create_at": {
- "type": "string"
- },
- "detail": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.Repos4UserBase"
- }
- ],
- "description": "公仓转私仓或仓库被删除后为 null"
- },
- "exposed_repo_path": {
- "description": "activity 发生时仓库的 path,这时的 path 是可以公开的",
- "type": "string"
- },
- "freeze": {
- "description": "仓库是否封禁",
- "type": "boolean"
- },
- "repo_unaccessible": {
- "description": "仓库是否不可访问(公仓转私仓或仓库被删除后不可访问)",
- "type": "boolean"
- },
- "visibility_level": {
- "allOf": [
- {
- "$ref": "#/definitions/constant.Visibility"
- }
- ],
- "description": "仓库可见性"
- }
- },
- "type": "object"
- },
- "dto.ActivityDate": {
- "properties": {
- "code_review_count": {
- "type": "integer"
- },
- "code_reviews": {
- "items": {
- "$ref": "#/definitions/dto.ActivityRepoDetail"
- },
- "type": "array"
- },
- "commit_count": {
- "type": "integer"
- },
- "commits": {
- "items": {
- "$ref": "#/definitions/dto.ActivityRepoDetail"
- },
- "type": "array"
- },
- "group_count": {
- "type": "integer"
- },
- "groups": {
- "items": {
- "$ref": "#/definitions/dto.ActivityJoinGroupDetail"
- },
- "type": "array"
- },
- "issues": {
- "items": {
- "$ref": "#/definitions/dto.ActivityRepoDetail"
- },
- "type": "array"
- },
- "issues_count": {
- "type": "integer"
- },
- "private_score": {
- "type": "integer"
- },
- "pull_request_count": {
- "type": "integer"
- },
- "pull_requests": {
- "items": {
- "$ref": "#/definitions/dto.ActivityRepoDetail"
- },
- "type": "array"
- },
- "repo_count": {
- "type": "integer"
- },
- "repos": {
- "items": {
- "$ref": "#/definitions/dto.ActivityCreateRepoDetail"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.ActivityJoinGroupDetail": {
- "properties": {
- "create_at": {
- "type": "string"
- },
- "detail": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.OrganizationUnion"
- }
- ],
- "description": "组织详情,组织被删后为 null"
- },
- "remark": {
- "description": "组织别名,组织被删除后才有值",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.ActivityRepoDetail": {
- "properties": {
- "detail": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.ActivitySlugDetail"
- }
- ],
- "description": "公仓转私仓或仓库被删除后为 null"
- },
- "exposed_repo_path": {
- "description": "activity 发生时仓库的 path,这时的 path 是可以公开的",
- "type": "string"
- },
- "freeze": {
- "description": "仓库是否封禁",
- "type": "boolean"
- },
- "repo_unaccessible": {
- "description": "仓库是否不可访问(公仓转私仓或仓库被删除后不可访问)",
- "type": "boolean"
- },
- "time": {
- "type": "number"
- },
- "visibility_level": {
- "allOf": [
- {
- "$ref": "#/definitions/constant.Visibility"
- }
- ],
- "description": "仓库可见性"
- }
- },
- "type": "object"
- },
- "dto.ActivitySlugDetail": {
- "properties": {
- "path": {
- "description": "完整仓库路径",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.AiAutoPrReq": {
- "properties": {
- "body": {
- "description": "需求内容",
- "type": "string"
- },
- "branch": {
- "description": "提 PR 的目标分支名",
- "type": "string"
- },
- "title": {
- "description": "需求标题",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.AiAutoPrResult": {
- "properties": {
- "buildLogUrl": {
- "description": "构建链接",
- "type": "string"
- },
- "message": {
- "description": "message",
- "type": "string"
- },
- "sn": {
- "description": "构建号",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.AiChatCompletionsChoice": {
- "properties": {
- "finish_reason": {
- "description": "结束原因",
- "type": "string"
- },
- "index": {
- "description": "索引",
- "type": "integer"
- },
- "message": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.Message"
- }
- ],
- "description": "消息"
- }
- },
- "type": "object"
- },
- "dto.AiChatCompletionsReq": {
- "properties": {
- "messages": {
- "description": "对话内容",
- "items": {
- "$ref": "#/definitions/dto.Message"
- },
- "type": "array"
- },
- "model": {
- "description": "模型名称",
- "type": "string"
- },
- "stream": {
- "description": "是否流式返回结果,部分模型可能不支持非流式",
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "dto.AiChatCompletionsResult": {
- "properties": {
- "choices": {
- "description": "选择",
- "items": {
- "$ref": "#/definitions/dto.AiChatCompletionsChoice"
- },
- "type": "array"
- },
- "created": {
- "description": "创建时间",
- "type": "integer"
- },
- "id": {
- "description": "ID",
- "type": "string"
- },
- "model": {
- "description": "模型",
- "type": "string"
- },
- "object": {
- "description": "对象",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.Assets": {
- "properties": {
- "content_type": {
- "type": "string"
- },
- "ext": {
- "additionalProperties": {
- "type": "string"
- },
- "type": "object"
- },
- "name": {
- "type": "string"
- },
- "path": {
- "example": "/{slug}/-/assets/xxx/xxx/xxxx-xxx.png",
- "type": "string"
- },
- "size": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.Badge": {
- "properties": {
- "desc": {
- "description": "徽章描述",
- "type": "string"
- },
- "group": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.BadgeGroup"
- }
- ],
- "description": "徽章分组"
- },
- "link": {
- "description": "徽章链接",
- "type": "string"
- },
- "name": {
- "description": "徽章名称",
- "type": "string"
- },
- "type": {
- "description": "徽章类型",
- "type": "string"
- },
- "url": {
- "description": "徽章URL",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.BadgeGroup": {
- "properties": {
- "status": {
- "description": "徽章分组状态",
- "type": "string"
- },
- "type": {
- "description": "徽章分组类型",
- "type": "string"
- },
- "typeEn": {
- "description": "徽章分组英文类型",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.BuildLogsDeleteResult": {
- "properties": {
- "code": {
- "description": "返回码,0 表示成功,1 表示失败",
- "type": "integer"
- },
- "message": {
- "description": "描述",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.BuildLogsResult": {
- "properties": {
- "data": {
- "description": "构建数据列表",
- "items": {
- "$ref": "#/definitions/dto.LogInfo"
- },
- "type": "array"
- },
- "init": {
- "description": "当前仓库是否已经有构建记录,1 表示有构建记录,0 表示没有构建记录",
- "type": "boolean"
- },
- "timestamp": {
- "description": "当前时间戳",
- "type": "integer"
- },
- "total": {
- "description": "总数",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.BuildResult": {
- "properties": {
- "buildLogUrl": {
- "description": "构建链接",
- "type": "string"
- },
- "message": {
- "description": "message",
- "type": "string"
- },
- "sn": {
- "description": "构建号",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.BuildStageResult": {
- "properties": {
- "content": {
- "description": "stage 日志内容,数组格式,一个元素表示一行日志",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "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"
- }
- },
- "type": "object"
- },
- "dto.BuildStatusResult": {
- "properties": {
- "jsonConfig": {
- "description": "解析后的流水线JSON格式配置内容",
- "type": "string"
- },
- "pipelinesStatus": {
- "additionalProperties": {
- "$ref": "#/definitions/dto.PipelineStatus"
- },
- "description": "流水线的状态",
- "type": "object"
- },
- "rawConfig": {
- "description": "流水线原始配置内容",
- "type": "string"
- },
- "status": {
- "description": "构建状态",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.ChartPackageDetail": {
- "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": {
- "items": {
- "$ref": "#/definitions/dto.ChartTag"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.ChartTag": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.ChartTagDetail": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.CodeRepoQuotaRsp": {
- "properties": {
- "docker": {
- "$ref": "#/definitions/dto.QuotaRsp"
- },
- "docker_model": {
- "$ref": "#/definitions/dto.QuotaRsp"
- },
- "helm": {
- "$ref": "#/definitions/dto.QuotaRsp"
- }
- },
- "type": "object"
- },
- "dto.CodeSensitiveSummary": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.CodeVulOverview": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.CommonRegistryPackageDetail": {
- "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": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.CommonRegistryTag": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.CommonRegistryTagDetail": {
- "properties": {
- "address": {
- "type": "string"
- },
- "dependencies": {
- "items": {
- "$ref": "#/definitions/dto.Dependency"
- },
- "type": "array"
- },
- "desc": {
- "type": "string"
- },
- "files": {
- "items": {
- "$ref": "#/definitions/dto.File"
- },
- "type": "array"
- },
- "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": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.ConanMetaData": {
- "properties": {
- "author": {
- "type": "string"
- },
- "conan_packages": {
- "description": "conan 的 package 列表",
- "items": {
- "$ref": "#/definitions/dto.ConanPackage"
- },
- "type": "array"
- },
- "conan_recipe_revision": {
- "description": "conan recipe 的 revision, conan 制品专用字段",
- "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"
- }
- },
- "type": "object"
- },
- "dto.ConanPackage": {
- "properties": {
- "build_type": {
- "type": "string"
- },
- "compiler": {
- "additionalProperties": {
- "type": "string"
- },
- "type": "object"
- },
- "options": {
- "additionalProperties": {
- "type": "string"
- },
- "type": "object"
- },
- "os/arch": {
- "type": "string"
- },
- "package_id": {
- "type": "string"
- },
- "package_revision": {
- "type": "string"
- },
- "requires": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.ConanRegistryTagDetail": {
- "properties": {
- "address": {
- "type": "string"
- },
- "dependencies": {
- "items": {
- "$ref": "#/definitions/dto.Dependency"
- },
- "type": "array"
- },
- "desc": {
- "type": "string"
- },
- "files": {
- "items": {
- "$ref": "#/definitions/dto.File"
- },
- "type": "array"
- },
- "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": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.ContainerAnnotation": {
- "properties": {
- "revision": {
- "type": "string"
- },
- "sn": {
- "type": "string"
- },
- "version": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.ContainerImage": {
- "properties": {
- "arch": {
- "type": "string"
- },
- "digest": {
- "type": "string"
- },
- "layers": {
- "items": {
- "$ref": "#/definitions/dto.ContainerImageLayer"
- },
- "type": "array"
- },
- "os": {
- "type": "string"
- },
- "size": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.ContainerImageLayer": {
- "properties": {
- "instruction": {
- "type": "string"
- },
- "size": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.ContainerPackageDetail": {
- "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": {
- "items": {
- "$ref": "#/definitions/dto.ContainerTag"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.ContainerTag": {
- "properties": {
- "address": {
- "type": "string"
- },
- "annotations": {
- "$ref": "#/definitions/dto.ContainerAnnotation"
- },
- "images": {
- "items": {
- "$ref": "#/definitions/dto.ContainerImage"
- },
- "type": "array"
- },
- "last_pusher": {
- "$ref": "#/definitions/dto.LastPusher"
- },
- "name": {
- "type": "string"
- },
- "pull_count": {
- "type": "integer"
- },
- "recent_pull_count": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.ContainerTagDetail": {
- "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": {
- "items": {
- "$ref": "#/definitions/dto.ContainerImage"
- },
- "type": "array"
- },
- "package": {
- "type": "string"
- },
- "pull_count": {
- "type": "integer"
- },
- "recent_pull_count": {
- "type": "integer"
- },
- "slug": {
- "type": "string"
- },
- "tag": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.CreateGroupReq": {
- "properties": {
- "bind_domain": {
- "description": "BindDomain 根组织绑定的域名",
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "remark": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.Dependency": {
- "properties": {
- "artifact": {
- "type": "string"
- },
- "framework_name": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.DockerModelConfig": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.DockerModelDescriptor": {
- "properties": {
- "created": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.DockerModelPackageDetail": {
- "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": {
- "items": {
- "$ref": "#/definitions/dto.DockerModelTag"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.DockerModelTag": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.DockerModelTagDetail": {
- "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"
- },
- "slug": {
- "type": "string"
- },
- "tag": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.DocumentStatistics": {
- "properties": {
- "count": {
- "type": "integer"
- },
- "size": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.EmbeddingModel": {
- "properties": {
- "dimension": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.EmbeddingModels": {
- "properties": {
- "dimension": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.File": {
- "properties": {
- "name": {
- "type": "string"
- },
- "size": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.GGUF": {
- "additionalProperties": true,
- "type": "object"
- },
- "dto.GetBadgeReq": {
- "properties": {
- "branch": {
- "description": "分支名,例如:main。不传则为默认分支,获取默认分支最新徽章。传了分支名,则获取该分支最新提交记录对应的徽章。",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.GetBadgeResult": {
- "properties": {
- "color": {
- "description": "徽章颜色",
- "type": "string"
- },
- "label": {
- "description": "徽章左侧显示内容",
- "type": "string"
- },
- "link": {
- "description": "徽章链接",
- "type": "string"
- },
- "links": {
- "description": "徽章链接列表",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "message": {
- "description": "徽章右侧显示内容",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.IssueConfig": {
- "properties": {
- "labels": {
- "description": "逗号分隔的标签字符串,如 \"bug,feature\"",
- "type": "string"
- },
- "state": {
- "description": "\"open\", \"closed\"",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.KnowledgeBaseInfoRes": {
- "properties": {
- "embedding_model": {
- "$ref": "#/definitions/dto.EmbeddingModels"
- },
- "exclude": {
- "type": "string"
- },
- "id": {
- "type": "integer"
- },
- "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"
- }
- },
- "type": "object"
- },
- "dto.KnowledgeBaseMetadata": {
- "properties": {
- "issue": {
- "$ref": "#/definitions/dto.IssueConfig"
- },
- "processing": {
- "$ref": "#/definitions/dto.ProcessingConfig"
- },
- "version": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.LastPusher": {
- "properties": {
- "is_frozen": {
- "type": "boolean"
- },
- "is_lock": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "nickname": {
- "type": "string"
- },
- "push_at": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.ListBadgeReq": {
- "type": "object"
- },
- "dto.ListBadgeResult": {
- "properties": {
- "badges": {
- "description": "徽章列表",
- "items": {
- "$ref": "#/definitions/dto.Badge"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.LogInfo": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.Message": {
- "properties": {
- "content": {
- "description": "内容",
- "type": "string"
- },
- "role": {
- "description": "角色,可选值:user、assistant",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.MetaData": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.MissionPostViewReq": {
- "properties": {
- "ids": {
- "description": "视图唯一标识列表,按此顺序排序",
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.MissionView": {
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/dto.MissionViewType"
- }
- },
- "type": "object"
- },
- "dto.MissionViewConfig": {
- "properties": {
- "fields": {
- "description": "字段配置",
- "items": {
- "$ref": "#/definitions/dto.MissionViewFieldConfig"
- },
- "type": "array"
- },
- "group": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.MissionViewGroup"
- }
- ],
- "description": "分组信息"
- },
- "id": {
- "description": "视图唯一标识",
- "type": "string"
- },
- "selectors": {
- "description": "筛选条件",
- "items": {
- "$ref": "#/definitions/dto.MissionViewSelector"
- },
- "type": "array"
- },
- "sorts": {
- "description": "排序条件",
- "items": {
- "$ref": "#/definitions/dto.MissionViewSort"
- },
- "type": "array"
- },
- "type": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.MissionViewType"
- }
- ],
- "description": "视图类型"
- }
- },
- "type": "object"
- },
- "dto.MissionViewFieldConfig": {
- "properties": {
- "field": {
- "type": "string"
- },
- "width": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.MissionViewGroup": {
- "properties": {
- "customOrders": {
- "$ref": "#/definitions/dto.MissionViewGroupCustom"
- },
- "customVisible": {
- "$ref": "#/definitions/dto.MissionViewGroupCustom"
- },
- "expendedList": {
- "items": {},
- "type": "array"
- },
- "field": {
- "type": "string"
- },
- "order": {
- "$ref": "#/definitions/dto.MissionViewSortOrder"
- }
- },
- "type": "object"
- },
- "dto.MissionViewGroupCustom": {
- "properties": {
- "field": {
- "type": "string"
- },
- "value": {
- "items": {},
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.MissionViewSelector": {
- "properties": {
- "field": {
- "type": "string"
- },
- "operator": {
- "$ref": "#/definitions/dto.OperatorType"
- },
- "value": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.MissionViewSort": {
- "properties": {
- "field": {
- "type": "string"
- },
- "order": {
- "$ref": "#/definitions/dto.MissionViewSortOrder"
- }
- },
- "type": "object"
- },
- "dto.MissionViewSortOrder": {
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string",
- "x-enum-varnames": [
- "MissionViewSortOrderAsc",
- "MissionViewSortOrderDesc"
- ]
- },
- "dto.MissionViewType": {
- "enum": [
- "table",
- "board",
- "gantt"
- ],
- "type": "string",
- "x-enum-varnames": [
- "MissionViewTypeTable",
- "MissionViewTypeBoard",
- "MissionViewTypeGantt"
- ]
- },
- "dto.OperatorType": {
- "enum": [
- "equal",
- "equals",
- "not_equals",
- "contains",
- "contains_all",
- "not_contains",
- "empty",
- "not_empty",
- "before",
- "after",
- "time_selector"
- ],
- "type": "string",
- "x-enum-varnames": [
- "OperatorTypeOldEqual",
- "OperatorTypeEqual",
- "OperatorTypeNotEqual",
- "OperatorTypeContains",
- "OperationTypeContainsAll",
- "OperatorTypeNotContains",
- "OperatorTypeEmpty",
- "OperatorTypeNotEmpty",
- "OperatorTypeBefore",
- "OperatorTypeAfter",
- "OperatorTypeDateRange"
- ]
- },
- "dto.OrganizationAccess": {
- "properties": {
- "access_role": {
- "allOf": [
- {
- "$ref": "#/definitions/constant.AccessRole"
- }
- ],
- "description": "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": {
- "readOnly": true,
- "type": "boolean"
- },
- "has_sub_group": {
- "type": "boolean"
- },
- "id": {
- "type": "integer"
- },
- "member_count": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "pinned": {
- "type": "boolean"
- },
- "pinned_time": {
- "type": "string"
- },
- "readme_repo_path": {
- "readOnly": true,
- "type": "string"
- },
- "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"
- }
- },
- "type": "object"
- },
- "dto.OrganizationUnion": {
- "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": {
- "readOnly": true,
- "type": "boolean"
- },
- "has_sub_group": {
- "type": "boolean"
- },
- "id": {
- "type": "integer"
- },
- "member_count": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "pinned": {
- "type": "boolean"
- },
- "pinned_time": {
- "type": "string"
- },
- "readme_repo_path": {
- "readOnly": true,
- "type": "string"
- },
- "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"
- }
- },
- "type": "object"
- },
- "dto.Package": {
- "properties": {
- "count": {
- "type": "integer"
- },
- "description": {
- "type": "string"
- },
- "labels": {
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "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"
- }
- },
- "type": "object"
- },
- "dto.PackageDetail": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.PackageType": {
- "enum": [
- "all",
- "docker",
- "helm",
- "docker-model",
- "npm",
- "maven",
- "ohpm",
- "pypi",
- "composer",
- "nuget",
- "conan",
- "cargo"
- ],
- "type": "string",
- "x-enum-varnames": [
- "PackageTypeArtifactory",
- "PackageTypeDocker",
- "PackageTypeHelm",
- "PackageTypeDockerModel",
- "PackageTypeNpm",
- "PackageTypeMaven",
- "PackageTypeOhpm",
- "PackageTypePypi",
- "PackageTypeComposer",
- "PackageTypeNuget",
- "PackageTypeConan",
- "PackageTypeCargo"
- ]
- },
- "dto.PipelineLabel": {
- "properties": {
- "key": {
- "type": "string"
- },
- "value": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.PipelineStatus": {
- "properties": {
- "duration": {
- "description": "流水线耗时",
- "type": "integer"
- },
- "id": {
- "description": "流水线 id",
- "type": "string"
- },
- "labels": {
- "description": "流水线标签",
- "items": {
- "$ref": "#/definitions/dto.PipelineLabel"
- },
- "type": "array"
- },
- "metricCoreHours": {
- "description": "流水线计费核时",
- "type": "number"
- },
- "metricDuration": {
- "description": "流水线计费耗时,单位:ms",
- "type": "number"
- },
- "stages": {
- "description": "流水线各 stage 的状态",
- "items": {
- "$ref": "#/definitions/dto.Stage"
- },
- "type": "array"
- },
- "status": {
- "description": "流水线状态",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.ProcessingConfig": {
- "properties": {
- "chunk_overlap": {
- "type": "integer"
- },
- "chunk_size": {
- "type": "integer"
- },
- "text_separator": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.PyPIMetaData": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.PyPIRegistryTagDetail": {
- "properties": {
- "address": {
- "type": "string"
- },
- "dependencies": {
- "items": {
- "$ref": "#/definitions/dto.Dependency"
- },
- "type": "array"
- },
- "desc": {
- "type": "string"
- },
- "files": {
- "items": {
- "$ref": "#/definitions/dto.File"
- },
- "type": "array"
- },
- "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": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.QueryKnowledgeBaseReq": {
- "properties": {
- "query": {
- "type": "string"
- },
- "score_threshold": {
- "type": "number"
- },
- "top_k": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.QueryKnowledgeBaseRes": {
- "properties": {
- "chunk": {
- "type": "string"
- },
- "metadata": {
- "additionalProperties": true,
- "type": "object"
- },
- "score": {
- "type": "number"
- }
- },
- "type": "object"
- },
- "dto.QuotaRsp": {
- "properties": {
- "hard": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.storage"
- }
- ],
- "description": "The hard limits of the quota,example: { \"hard\": { \"storage\": -1}}"
- },
- "repository_name": {
- "description": "The repository name of the quota",
- "type": "string"
- },
- "storage_per_project": {
- "description": "The cnb default quota value",
- "type": "string"
- },
- "used": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.storage"
- }
- ],
- "description": "The used limits of the quota,example: { \"used\": { \"storage\": 0}}"
- }
- },
- "type": "object"
- },
- "dto.RegistryLevelQuotaRsp": {
- "properties": {
- "code_repo": {
- "$ref": "#/definitions/dto.CodeRepoQuotaRsp"
- },
- "common_registry": {
- "$ref": "#/definitions/dto.QuotaRsp"
- }
- },
- "type": "object"
- },
- "dto.RepoLanguage": {
- "properties": {
- "color": {
- "type": "string"
- },
- "language": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.RepoPatch": {
- "properties": {
- "description": {
- "type": "string"
- },
- "license": {
- "type": "string"
- },
- "site": {
- "type": "string"
- },
- "topics": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.RepoSecurityOverview": {
- "properties": {
- "code_sensitive": {
- "$ref": "#/definitions/dto.CodeSensitiveSummary"
- },
- "code_vulnerability": {
- "$ref": "#/definitions/dto.CodeVulOverview"
- },
- "risk_cnt": {
- "$ref": "#/definitions/dto.RepoSecurityRiskCnt"
- }
- },
- "type": "object"
- },
- "dto.RepoSecurityRiskCnt": {
- "properties": {
- "code_sensitive_risk_cnt": {
- "description": "敏感信息风险数量(高风险)",
- "type": "integer"
- },
- "code_vulnerability_risk_cnt": {
- "description": "代码漏洞风险数量(严重+高风险)",
- "type": "integer"
- },
- "enable": {
- "description": "是否开启安全模块",
- "type": "boolean"
- },
- "total": {
- "description": "总计数",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.Repos4User": {
- "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": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.Slugs"
- }
- ],
- "description": "预留"
- },
- "freeze": {
- "readOnly": true,
- "type": "boolean"
- },
- "id": {
- "type": "string"
- },
- "language": {
- "description": "仓库程序语言,预留",
- "type": "string"
- },
- "languages": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.RepoLanguage"
- }
- ],
- "description": "仓库语言"
- },
- "last_update_nickname": {
- "description": "最新代码更新人姓名",
- "type": "string"
- },
- "last_update_username": {
- "description": "最新代码更新人账户名",
- "type": "string"
- },
- "last_updated_at": {
- "allOf": [
- {
- "$ref": "#/definitions/convert.NullTime"
- }
- ],
- "description": "最新代码更新时间"
- },
- "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": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.RepoLanguage"
- }
- ],
- "description": "第二语言"
- },
- "site": {
- "type": "string"
- },
- "star_count": {
- "type": "integer"
- },
- "star_time": {
- "type": "string"
- },
- "stared": {
- "type": "boolean"
- },
- "status": {
- "allOf": [
- {
- "$ref": "#/definitions/constant.RepoStatus"
- }
- ],
- "readOnly": true
- },
- "tags": {
- "items": {
- "properties": {
- "name": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "topics": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- },
- "visibility_level": {
- "$ref": "#/definitions/constant.Visibility"
- },
- "web_url": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.Repos4UserBase": {
- "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": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.Slugs"
- }
- ],
- "description": "预留"
- },
- "freeze": {
- "readOnly": true,
- "type": "boolean"
- },
- "id": {
- "type": "string"
- },
- "language": {
- "description": "仓库程序语言,预留",
- "type": "string"
- },
- "languages": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.RepoLanguage"
- }
- ],
- "description": "仓库语言"
- },
- "last_update_nickname": {
- "description": "最新代码更新人姓名",
- "type": "string"
- },
- "last_update_username": {
- "description": "最新代码更新人账户名",
- "type": "string"
- },
- "last_updated_at": {
- "allOf": [
- {
- "$ref": "#/definitions/convert.NullTime"
- }
- ],
- "description": "最新代码更新时间"
- },
- "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": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.RepoLanguage"
- }
- ],
- "description": "第二语言"
- },
- "site": {
- "type": "string"
- },
- "star_count": {
- "type": "integer"
- },
- "status": {
- "allOf": [
- {
- "$ref": "#/definitions/constant.RepoStatus"
- }
- ],
- "readOnly": true
- },
- "tags": {
- "items": {
- "properties": {
- "name": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "topics": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- },
- "visibility_level": {
- "$ref": "#/definitions/constant.Visibility"
- },
- "web_url": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.Slugs": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.Stage": {
- "properties": {
- "duration": {
- "description": "stage 耗时",
- "type": "integer"
- },
- "id": {
- "description": "stage id",
- "type": "string"
- },
- "status": {
- "description": "stage 状态",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.StartBuildReq": {
- "properties": {
- "branch": {
- "description": "触发分支,默认为主分支",
- "type": "string"
- },
- "config": {
- "description": "指定配置文件内容,yaml 格式",
- "type": "string"
- },
- "env": {
- "additionalProperties": {
- "type": "string"
- },
- "description": "环境变量,对象格式",
- "type": "object"
- },
- "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"
- }
- },
- "type": "object"
- },
- "dto.StartWorkspaceReq": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.StartWorkspaceResult": {
- "properties": {
- "buildLogUrl": {
- "description": "仅新创建开发环境时返回,表示创建开发环境的流水线日志地址",
- "type": "string"
- },
- "message": {
- "description": "仅新创建开发环境时返回,表示创建开发环境的提示信息",
- "type": "string"
- },
- "sn": {
- "description": "仅新创建开发环境时返回,表示创建开发环境的流水线 sn",
- "type": "string"
- },
- "url": {
- "description": "如果存在开发环境,则返回 WebIDE 访问 url;如果不存在开发环境,则返回启动云原生开发的 loading 页面 url 地址",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.Tag": {
- "properties": {
- "cargo": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- },
- "composer": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- },
- "conan": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- },
- "docker": {
- "items": {
- "$ref": "#/definitions/dto.ContainerTag"
- },
- "type": "array"
- },
- "docker_model": {
- "items": {
- "$ref": "#/definitions/dto.DockerModelTag"
- },
- "type": "array"
- },
- "helm": {
- "items": {
- "$ref": "#/definitions/dto.ChartTag"
- },
- "type": "array"
- },
- "maven": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- },
- "npm": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- },
- "nuget": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- },
- "ohpm": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- },
- "package": {
- "type": "string"
- },
- "pypi": {
- "items": {
- "$ref": "#/definitions/dto.CommonRegistryTag"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "dto.TagDetail": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.TransferSlugReq": {
- "properties": {
- "source": {
- "type": "string"
- },
- "target": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.UpdateGroupReq": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.UpdateUserInfoPayload": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.UploadAssetsResponse": {
- "properties": {
- "assets": {
- "$ref": "#/definitions/dto.Assets"
- },
- "form": {
- "additionalProperties": {
- "type": "string"
- },
- "type": "object"
- },
- "token": {
- "description": "后续调用 confirm 接口用的",
- "type": "string"
- },
- "upload_url": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.UploadBadgeReq": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.UploadBadgeResult": {
- "properties": {
- "latest_url": {
- "description": "latest 对应的徽章 url 地址。如果没有传 latest: true,则该字段为空字符串",
- "type": "string"
- },
- "url": {
- "description": "commitid 对应的徽章 url 地址",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.UploadRequestParams": {
- "properties": {
- "ext": {
- "additionalProperties": {
- "type": "string"
- },
- "type": "object"
- },
- "name": {
- "type": "string"
- },
- "size": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.UserFollowResult": {
- "properties": {
- "freeze": {
- "type": "boolean"
- },
- "is_following": {
- "description": "查询人是否follow了此用户",
- "type": "boolean"
- },
- "locked": {
- "type": "boolean"
- },
- "nickname": {
- "type": "string"
- },
- "username": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.UsersResult": {
- "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": {
- "readOnly": true,
- "type": "string"
- },
- "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"
- }
- },
- "type": "object"
- },
- "dto.UsersResultForSelf": {
- "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": {
- "readOnly": true,
- "type": "string"
- },
- "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"
- }
- },
- "type": "object"
- },
- "dto.WorkspaceDeleteReq": {
- "properties": {
- "pipelineId": {
- "description": "表示要删除的开发环境流水线 id,sn 和 pipelineId 二选一,优先使用 pipelineId",
- "type": "string"
- },
- "sn": {
- "description": "表示要删除的开发环境流水线构建号,sn 和 pipelineId 二选一,优先使用 pipelineId",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.WorkspaceDeleteResult": {
- "properties": {
- "code": {
- "description": "返回码,0 表示成功,1 表示失败",
- "type": "integer"
- },
- "message": {
- "description": "描述",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.WorkspaceDetailResult": {
- "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": {
- "additionalProperties": {
- "type": "string"
- },
- "description": "jetbrains 系列 ide 的 jetbrains gateway 访问 schema 地址,环境内有安装 JetBrains 系列 ide 才会有",
- "type": "object"
- },
- "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"
- }
- },
- "type": "object"
- },
- "dto.WorkspaceInfo": {
- "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"
- }
- },
- "type": "object"
- },
- "dto.WorkspaceListResult": {
- "properties": {
- "hasMore": {
- "description": "是否有更多数据",
- "type": "boolean"
- },
- "list": {
- "description": "云原生开发环境列表",
- "items": {
- "$ref": "#/definitions/dto.WorkspaceInfo"
- },
- "type": "array"
- },
- "pageInfo": {
- "allOf": [
- {
- "$ref": "#/definitions/dto.WorkspacePageInfo"
- }
- ],
- "description": "分页信息"
- },
- "total": {
- "description": "总数",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.WorkspacePageInfo": {
- "properties": {
- "page": {
- "type": "integer"
- },
- "pageSize": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "dto.WorkspaceStopReq": {
- "properties": {
- "pipelineId": {
- "description": "表示要停止的开发环境的流水线 id,sn 和 pipelineId 二选一,优先使用 pipelineId",
- "type": "string"
- },
- "sn": {
- "description": "表示要停止的开发环境流水线构建号,sn 和 pipelineId 二选一,优先使用 pipelineId",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.WorkspaceStopResult": {
- "properties": {
- "buildLogUrl": {
- "description": "表示停止的开发环境流水线日志地址",
- "type": "string"
- },
- "message": {
- "description": "表示操作结果提示信息",
- "type": "string"
- },
- "sn": {
- "description": "表示停止的开发环境流水线构建号",
- "type": "string"
- }
- },
- "type": "object"
- },
- "dto.storage": {
- "properties": {
- "storage": {
- "description": "example: { \"hard\": { \"storage\": -1}},移除 omitempty ,Storage = 0,会生成 {\"hard\":{\"storage\":0}}",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "flags.Repo": {
- "enum": [
- 0,
- 2,
- 4
- ],
- "type": "integer",
- "x-enum-varnames": [
- "Unknown",
- "KnowledgeBase",
- "HideRank"
- ]
- },
- "git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.CommitStatus": {
- "properties": {
- "context": {
- "type": "string"
- },
- "created_at": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "state": {
- "type": "string"
- },
- "target_url": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo": {
- "properties": {
- "email": {
- "type": "string"
- },
- "freeze": {
- "type": "boolean"
- },
- "nickname": {
- "type": "string"
- },
- "username": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.CommitStatus": {
- "properties": {
- "context": {
- "type": "string"
- },
- "created_at": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "state": {
- "type": "string"
- },
- "target_url": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo": {
- "properties": {
- "nickname": {
- "type": "string"
- },
- "username": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "openapi.CommitAssetUploadURL": {
- "properties": {
- "expires_in_sec": {
- "type": "integer"
- },
- "upload_url": {
- "type": "string"
- },
- "verify_url": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "openapi.CreateBranchForm": {
- "properties": {
- "name": {
- "type": "string"
- },
- "start_point": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "openapi.HeadRef": {
- "properties": {
- "name": {
- "type": "string"
- },
- "protected": {
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "openapi.PatchReleaseForm": {
- "properties": {
- "body": {
- "type": "string"
- },
- "draft": {
- "type": "boolean"
- },
- "make_latest": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "prerelease": {
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "openapi.PostCommitAssetUploadURLForm": {
- "properties": {
- "asset_name": {
- "type": "string"
- },
- "size": {
- "description": "附件大小,单位为字节。 Attachment size, in bytes.",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "openapi.PostReleaseAssetUploadURLForm": {
- "properties": {
- "asset_name": {
- "type": "string"
- },
- "overwrite": {
- "type": "boolean"
- },
- "size": {
- "description": "附件大小,单位为字节。 Attachment size, in bytes.",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "openapi.PostReleaseForm": {
- "properties": {
- "body": {
- "type": "string"
- },
- "draft": {
- "type": "boolean"
- },
- "make_latest": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "prerelease": {
- "type": "boolean"
- },
- "tag_name": {
- "type": "string"
- },
- "target_commitish": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "openapi.PutCommitAnnotation": {
- "properties": {
- "key": {
- "type": "string"
- },
- "value": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "openapi.PutCommitAnnotationsForm": {
- "properties": {
- "annotations": {
- "items": {
- "$ref": "#/definitions/openapi.PutCommitAnnotation"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "openapi.PutTagAnnotation": {
- "properties": {
- "key": {
- "type": "string"
- },
- "value": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "openapi.PutTagAnnotationsForm": {
- "properties": {
- "annotations": {
- "items": {
- "$ref": "#/definitions/openapi.PutTagAnnotation"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "openapi.ReleaseAssetUploadURL": {
- "properties": {
- "expires_in_sec": {
- "type": "integer"
- },
- "upload_url": {
- "type": "string"
- },
- "verify_url": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "web.CommitAnnotation": {
- "properties": {
- "key": {
- "type": "string"
- },
- "meta": {
- "additionalProperties": {},
- "type": "object"
- },
- "value": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "web.CommitAnnotationInBatch": {
- "properties": {
- "annotations": {
- "items": {
- "$ref": "#/definitions/web.CommitAnnotation"
- },
- "type": "array"
- },
- "commit_hash": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "web.GetCommitAnnotationsInBatchForm": {
- "properties": {
- "commit_hashes": {
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "keys": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "web.PipelineSettings": {
- "properties": {
- "auto_trigger": {
- "type": "boolean"
- },
- "forked_repo_auto_trigger": {
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "web.TagAnnotation": {
- "properties": {
- "key": {
- "type": "string"
- },
- "meta": {
- "additionalProperties": {},
- "type": "object"
- },
- "value": {
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "paths": {
- "/events/{repo}/-/{date}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \n",
- "operationId": "GetEvents",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Event"
- ],
- "summary": "获取仓库动态预签名地址,并返回内容",
- "parameters": [
- {
- "description": "repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "动态日期,格式为yy-mm-dd-h, eg:2025-09-11-5",
- "in": "path",
- "name": "date",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/groups": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw",
- "operationId": "CreateOrganization",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Organizations"
- ],
- "summary": "创建新组织。Create new organization.",
- "parameters": [
- {
- "description": "group information",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.CreateGroupReq"
- }
- }
- ],
- "responses": {
- "201": {
- "description": "Created"
- }
- }
- }
- },
- "/user": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:r",
- "operationId": "GetUserInfo",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Users"
- ],
- "summary": "获取指定用户的详情信息。Get detailed information for a specified user.",
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.UsersResultForSelf"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:rw",
- "operationId": "UpdateUserInfo",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Users"
- ],
- "summary": "更新指定用户的详情信息。Updates the specified user's profile information.",
- "parameters": [
- {
- "description": "user info",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.UpdateUserInfoPayload"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/user/autocomplete_source": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "AutoCompleteSource",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Users"
- ],
- "summary": "查询当前用户用户拥有指定权限的所有资源列表。List resources that the current user has specified permissions for.",
- "parameters": [
- {
- "default": "Group",
- "description": "Source type, default(Group)",
- "enum": [
- "Group",
- "Repo"
- ],
- "in": "query",
- "name": "source_type",
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "default": "",
- "description": "Filter by resources.",
- "in": "query",
- "name": "search",
- "type": "string"
- },
- {
- "default": "Owner",
- "description": "最小仓库权限,默认owner。Minima repository permissions, default(Owner)",
- "enum": [
- "Reporter",
- "Developer",
- "Master",
- "Owner"
- ],
- "in": "query",
- "name": "access",
- "type": "string"
- },
- {
- "description": "Order field,default(created_at)",
- "enum": [
- "created_at",
- "slug_path"
- ],
- "in": "query",
- "name": "order_by",
- "type": "string"
- },
- {
- "default": false,
- "description": "排序顺序。Ordering.",
- "in": "query",
- "name": "desc",
- "type": "boolean"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- }
- }
- }
- },
- "/user/groups": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "ListTopGroups",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Organizations"
- ],
- "summary": "获取当前用户拥有权限的顶层组织列表。Get top-level organizations list that the current user has access to.",
- "parameters": [
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "default": "",
- "description": "Filter by organizations.",
- "in": "query",
- "name": "search",
- "type": "string"
- },
- {
- "description": "Filter by role.",
- "enum": [
- "Guest",
- "Reporter",
- "Developer",
- "Master",
- "Owner"
- ],
- "in": "query",
- "name": "role",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.OrganizationAccess"
- },
- "type": "array"
- }
- }
- }
- }
- },
- "/user/repos": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "GetRepos",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Repositories"
- ],
- "summary": "获取当前用户拥有指定权限及其以上权限的仓库。List repositories owned by the current user with the specified permissions or higher.",
- "parameters": [
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "default": "",
- "description": "Filter by repositories",
- "in": "query",
- "name": "search",
- "type": "string"
- },
- {
- "description": "RType",
- "enum": [
- "private",
- "public",
- "secret"
- ],
- "in": "query",
- "name": "filter_type",
- "type": "string"
- },
- {
- "default": "Owner",
- "description": "最小仓库权限,默认owner。Minima repository permissions, default(Owner)",
- "enum": [
- "Reporter",
- "Developer",
- "Master",
- "Owner"
- ],
- "in": "query",
- "name": "role",
- "type": "string"
- },
- {
- "description": "仓库类型标记,逗号分隔。Repository type flags, comma separated",
- "enum": [
- "KnowledgeBase"
- ],
- "in": "query",
- "name": "flags",
- "type": "string"
- },
- {
- "description": "仓库状态。Repository status",
- "enum": [
- "active",
- "archived"
- ],
- "in": "query",
- "name": "status",
- "type": "string"
- },
- {
- "description": "Order field,default(last_updated_at)",
- "enum": [
- "created_at",
- "last_updated_at",
- "stars",
- "slug_path",
- "forks"
- ],
- "in": "query",
- "name": "order_by",
- "type": "string"
- },
- {
- "default": false,
- "description": "排序顺序。Ordering.",
- "in": "query",
- "name": "desc",
- "type": "boolean"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.Repos4User"
- },
- "type": "array"
- }
- }
- }
- }
- },
- "/user/stared-repos": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "GetUserAllStaredRepos",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Repositories"
- ],
- "summary": "获取当前用户 star 的仓库列表。List all stared repositories.",
- "parameters": [
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "default": "",
- "description": "Filter by repositories",
- "in": "query",
- "name": "search",
- "type": "string"
- },
- {
- "default": false,
- "description": "排序顺序。Ordering.",
- "in": "query",
- "name": "desc",
- "type": "boolean"
- },
- {
- "description": "Order field,default(last_updated_at)",
- "enum": [
- "created_at",
- "last_updated_at",
- "stared_time",
- "stars",
- "forks"
- ],
- "in": "query",
- "name": "order_by",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.Repos4User"
- },
- "type": "array"
- }
- }
- }
- }
- },
- "/users/{username}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:r",
- "operationId": "GetUserInfoByName",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Users"
- ],
- "summary": "获取指定用户的详情信息。Get detailed information for a specified user.",
- "parameters": [
- {
- "description": "User Name",
- "in": "path",
- "name": "username",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.UsersResult"
- }
- }
- }
- }
- },
- "/users/{username}/activities": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "GetUserActivitiesByDate",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Activities"
- ],
- "summary": "获取个人动态活跃详情汇总",
- "parameters": [
- {
- "description": "UserName",
- "in": "path",
- "name": "username",
- "required": true,
- "type": "string"
- },
- {
- "description": "查询日期,格式 yyyyMM,或者 yyyyMMdd",
- "in": "query",
- "name": "date",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.ActivityDate"
- }
- }
- }
- }
- },
- "/users/{username}/followers": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "GetFollowersByUserID",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Followers"
- ],
- "summary": "获取指定用户的粉丝列表。Get the followers list of specified user.",
- "parameters": [
- {
- "description": "Username",
- "in": "path",
- "name": "username",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.UserFollowResult"
- },
- "type": "array"
- }
- }
- }
- }
- },
- "/users/{username}/following": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "GetFollowingByUserID",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Followers"
- ],
- "summary": "获取指定用户的关注人列表。Get the list of users that the specified user is following.",
- "parameters": [
- {
- "description": "Username",
- "in": "path",
- "name": "username",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.UserFollowResult"
- },
- "type": "array"
- }
- }
- }
- }
- },
- "/users/{username}/groups": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "GetGroupsByUserID",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Organizations"
- ],
- "summary": "获取指定用户拥有权限的顶层组织列表。 Get a list of top-level organizations that the specified user has permissions to access.",
- "parameters": [
- {
- "description": "UserName",
- "in": "path",
- "name": "username",
- "required": true,
- "type": "string"
- },
- {
- "default": "",
- "description": "Filter organizations.",
- "in": "query",
- "name": "search",
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.OrganizationUnion"
- }
- }
- }
- }
- },
- "/users/{username}/pinned-repos": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "GetPinnedRepoByID",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Repositories"
- ],
- "summary": "获取指定用户的用户仓库墙。 Get a list of repositories that the specified user has pinned.",
- "parameters": [
- {
- "description": "User Name",
- "in": "path",
- "name": "username",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.Repos4User"
- },
- "type": "array"
- }
- }
- }
- }
- },
- "/users/{username}/repo-activities/{activityType}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "GetUserRepoActivityDetails",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Activities"
- ],
- "summary": "个人仓库动态详情列表",
- "parameters": [
- {
- "description": "UserName",
- "in": "path",
- "name": "username",
- "required": true,
- "type": "string"
- },
- {
- "description": "activity type",
- "enum": [
- "issue",
- "pull_request",
- "code_review"
- ],
- "in": "path",
- "name": "activityType",
- "required": true,
- "type": "string"
- },
- {
- "description": "仓库路径",
- "in": "query",
- "name": "slug",
- "required": true,
- "type": "string"
- },
- {
- "description": "查询日期,格式 yyyyMM,或者 yyyyMMdd",
- "in": "query",
- "name": "date",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "返回 []dto.ActivityPullRequestDetail|[]dto.ActivityIssueDetail",
- "schema": {
- "items": {},
- "type": "array"
- }
- }
- }
- }
- },
- "/users/{username}/repos": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "GetReposByUserName",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Repositories"
- ],
- "summary": "获取指定用户有指定以上权限并且客人态可见的仓库。List repositories where the specified user has the specified permission level or higher and are visible to guests.",
- "parameters": [
- {
- "description": "UserName",
- "in": "path",
- "name": "username",
- "required": true,
- "type": "string"
- },
- {
- "default": "",
- "description": "Filter by repositories",
- "in": "query",
- "name": "search",
- "type": "string"
- },
- {
- "description": "Repositories type",
- "enum": [
- "private",
- "public",
- "secret"
- ],
- "in": "query",
- "name": "filter_type",
- "type": "string"
- },
- {
- "description": "仓库类型标记,逗号分隔。Repository type flags, comma separated",
- "enum": [
- "KnowledgeBase"
- ],
- "in": "query",
- "name": "flags",
- "type": "string"
- },
- {
- "description": "仓库状态。Repository status",
- "enum": [
- "active",
- "archived"
- ],
- "in": "query",
- "name": "status",
- "type": "string"
- },
- {
- "default": "Owner",
- "description": "最小仓库权限,默认owner。Minima repository permissions, default(Owner).",
- "enum": [
- "Reporter",
- "Developer",
- "Master",
- "Owner"
- ],
- "in": "query",
- "name": "role",
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "default": false,
- "description": "排序顺序。Ordering.",
- "in": "query",
- "name": "desc",
- "type": "boolean"
- },
- {
- "description": "Order field,default(last_updated_at)",
- "enum": [
- "created_at",
- "last_updated_at",
- "stars",
- "slug_path",
- "forks"
- ],
- "in": "query",
- "name": "order_by",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.Repos4User"
- },
- "type": "array"
- }
- }
- }
- }
- },
- "/users/{username}/stared-repos": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "GetUserStaredRepos",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Starring"
- ],
- "summary": "获取指定用户的 star 仓库列表。Get the list of repositories starred by the specified user.",
- "parameters": [
- {
- "description": "UserName",
- "in": "path",
- "name": "username",
- "required": true,
- "type": "string"
- },
- {
- "default": "",
- "description": "过滤仓库。Filter by repositories",
- "in": "query",
- "name": "search",
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "default": false,
- "description": "Ordering",
- "in": "query",
- "name": "desc",
- "type": "boolean"
- },
- {
- "description": "Order field,default(last_updated_at)",
- "enum": [
- "created_at",
- "last_updated_at",
- "stars",
- "forks"
- ],
- "in": "query",
- "name": "order_by",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.Repos4User"
- },
- "type": "array"
- }
- }
- }
- }
- },
- "/workspace/delete": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:rw",
- "operationId": "DeleteWorkspace",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Workspace"
- ],
- "summary": "删除我的云原生开发环境。Delete my workspace.",
- "parameters": [
- {
- "description": "params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.WorkspaceDeleteReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.WorkspaceDeleteResult"
- }
- }
- }
- }
- },
- "/workspace/list": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r",
- "operationId": "ListWorkspaces",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Workspace"
- ],
- "summary": "获取我的云原生开发环境列表。List my workspaces.",
- "parameters": [
- {
- "description": "Git branch name, e.g. \"main\"",
- "in": "query",
- "name": "branch",
- "type": "string"
- },
- {
- "description": "查询结束时间。Query end time. format YYYY-MM-DD HH:mm:ssZZ, e.g. 2024-12-01 00:00:00+0800",
- "in": "query",
- "name": "end",
- "type": "string"
- },
- {
- "description": "Pagination page number, default(1)",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "description": "Pagination page size, default(20), max(100)",
- "in": "query",
- "name": "pageSize",
- "type": "integer"
- },
- {
- "description": "Repository path, e.g. \"groupname/reponame\"",
- "in": "query",
- "name": "slug",
- "type": "string"
- },
- {
- "description": "查询开始时间。Query start time. format YYYY-MM-DD HH:mm:ssZZ, e.g. 2024-12-01 00:00:00+0800",
- "in": "query",
- "name": "start",
- "type": "string"
- },
- {
- "description": "开发环境状态,running: 开发环境已启动,closed:开发环境已关闭。Workspace status: \"running\" for started, \"closed\" for stopped.",
- "in": "query",
- "name": "status",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.WorkspaceListResult"
- }
- }
- }
- }
- },
- "/workspace/stop": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:rw",
- "operationId": "WorkspaceStop",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Workspace"
- ],
- "summary": "停止/关闭我的云原生开发环境。Stop/close my workspace.",
- "parameters": [
- {
- "description": "params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.WorkspaceStopReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.WorkspaceStopResult"
- }
- }
- }
- }
- },
- "/{group}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-delete:rw",
- "operationId": "DeleteOrganization",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Organizations"
- ],
- "summary": "删除指定组织。Delete the specified organization.",
- "parameters": [
- {
- "description": "group path",
- "in": "path",
- "name": "group",
- "required": true,
- "type": "string"
- },
- {
- "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.",
- "in": "header",
- "name": "x-cnb-identity-ticket",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r",
- "operationId": "GetGroup",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Organizations"
- ],
- "summary": "获取指定组织信息。Get information for the specified organization.",
- "parameters": [
- {
- "description": "group path",
- "in": "path",
- "name": "group",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "group",
- "schema": {
- "$ref": "#/definitions/dto.OrganizationAccess"
- }
- }
- }
- },
- "put": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw",
- "operationId": "UpdateOrganization",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Organizations"
- ],
- "summary": "更新组织信息, 可更新的内容为: 组织描述, 组织展示名称, 组织网站, 组织联系邮箱。Updates organization information including: description, display name, website URL and contact email.",
- "parameters": [
- {
- "description": "slug",
- "in": "path",
- "name": "group",
- "required": true,
- "type": "string"
- },
- {
- "description": "group information to update",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.UpdateGroupReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{group}/-/transfer": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw",
- "operationId": "TransferGroup",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Organizations"
- ],
- "summary": "转移组织",
- "parameters": [
- {
- "description": "slug",
- "in": "path",
- "name": "group",
- "required": true,
- "type": "string"
- },
- {
- "description": "request",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.TransferSlugReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{group}/-/upload/logos": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw",
- "operationId": "UploadLogos",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Assets"
- ],
- "summary": "发起一个上传 logo 的请求,返回上传文件的url,请使用 put 发起流式上传。Initiate a request to upload logo,returns upload URL.Use PUT to initiate a stream upload.",
- "parameters": [
- {
- "description": "group",
- "in": "path",
- "name": "group",
- "required": true,
- "type": "string"
- },
- {
- "description": "UploadRequestParams",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.UploadRequestParams"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.UploadAssetsResponse"
- }
- }
- }
- }
- },
- "/{mission}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-delete:rw",
- "operationId": "DeleteMission",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Missions"
- ],
- "summary": "删除指定任务集。Delete the specified mission.",
- "parameters": [
- {
- "description": "mission path",
- "in": "path",
- "name": "mission",
- "required": true,
- "type": "string"
- },
- {
- "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.",
- "in": "header",
- "name": "x-cnb-identity-ticket",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{mission}/-/mission/view": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:r",
- "operationId": "GetMissionViewConfig",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Missions"
- ],
- "summary": "查询任务集视图配置信息。Get mission view config.",
- "parameters": [
- {
- "description": "Mission slug",
- "in": "path",
- "name": "mission",
- "required": true,
- "type": "string"
- },
- {
- "description": "View ID",
- "in": "query",
- "name": "id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.MissionViewConfig"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:rw",
- "operationId": "PostMissionViewConfig",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Missions"
- ],
- "summary": "设置任务集视图配置信息。Set mission view config.",
- "parameters": [
- {
- "description": "Mission slug",
- "in": "path",
- "name": "mission",
- "required": true,
- "type": "string"
- },
- {
- "description": "Params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.MissionViewConfig"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{mission}/-/mission/view-list": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:r",
- "operationId": "GetMissionViewList",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Missions"
- ],
- "summary": "获取任务集视图列表。Get view list of a mission.",
- "parameters": [
- {
- "description": "mission",
- "in": "path",
- "name": "mission",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.MissionView"
- },
- "type": "array"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:rw",
- "operationId": "PostMissionViewList",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Missions"
- ],
- "summary": "排序任务集视图。Sort mission view list.",
- "parameters": [
- {
- "description": "Mission slug",
- "in": "path",
- "name": "mission",
- "required": true,
- "type": "string"
- },
- {
- "description": "Params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.MissionPostViewReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- },
- "put": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:rw",
- "operationId": "PutMissionViewList",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Missions"
- ],
- "summary": "添加、修改任务集视图。Update a mission view or add a new one.",
- "parameters": [
- {
- "description": "Mission slug",
- "in": "path",
- "name": "mission",
- "required": true,
- "type": "string"
- },
- {
- "description": "Params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.MissionView"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{mission}/-/settings/set_visibility": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:rw",
- "operationId": "SetMissionVisibility",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Missions"
- ],
- "summary": "改变任务集可见性",
- "parameters": [
- {
- "description": "mission path",
- "in": "path",
- "name": "mission",
- "required": true,
- "type": "string"
- },
- {
- "description": "任务集可见性",
- "enum": [
- "Private",
- "Public"
- ],
- "in": "query",
- "name": "visibility",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{registry}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-delete:rw",
- "operationId": "DeleteRegistry",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "删除制品仓库。Delete the artifact repository.",
- "parameters": [
- {
- "description": "registry path",
- "in": "path",
- "name": "registry",
- "required": true,
- "type": "string"
- },
- {
- "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.",
- "in": "header",
- "name": "x-cnb-identity-ticket",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{registry}/-/settings/set_visibility": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-manage:rw",
- "operationId": "SetRegistryVisibility",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "改变制品仓库可见性",
- "parameters": [
- {
- "description": "registry path",
- "in": "path",
- "name": "registry",
- "required": true,
- "type": "string"
- },
- {
- "description": "可见性",
- "enum": [
- "Private",
- "Public"
- ],
- "in": "query",
- "name": "visibility",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{repo}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-delete:rw",
- "operationId": "DeleteRepo",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Repositories"
- ],
- "summary": "删除指定仓库。Delete the specified repository.",
- "parameters": [
- {
- "description": "repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.",
- "in": "header",
- "name": "x-cnb-identity-ticket",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-basic-info:r",
- "operationId": "GetByID",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Repositories"
- ],
- "summary": "获取指定仓库信息。Get information for the specified repository.",
- "parameters": [
- {
- "description": "repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "repo",
- "schema": {
- "$ref": "#/definitions/dto.Repos4User"
- }
- }
- }
- },
- "patch": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw",
- "operationId": "UpdateRepo",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Repositories"
- ],
- "summary": "更新仓库信息, 可更新的内容为: 仓库简介, 仓库站点, 仓库主题, 开源许可证。updates repository details including description, website URL,topics and license type.",
- "parameters": [
- {
- "description": "repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "request body",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.RepoPatch"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{repo}/-/ai/chat/completions": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "AiChatCompletions",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Ai"
- ],
- "summary": "Ai 对话,参数根据模型不同会有区别。Ai chat completions, params may differ by model.",
- "parameters": [
- {
- "description": "仓库完整路径",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "AI chat completions params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.AiChatCompletionsReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.AiChatCompletionsResult"
- }
- }
- }
- }
- },
- "/{repo}/-/badge/git/{sha}/{badge}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-commit-status:r",
- "operationId": "GetBadge",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Badge"
- ],
- "summary": "获取徽章 svg 或 JSON 数据。Get badge svg or JSON data.",
- "parameters": [
- {
- "description": "仓库完整路径",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "latest 或 commit 8 位短 hash(例如 89d48c07)",
- "in": "path",
- "name": "sha",
- "required": true,
- "type": "string"
- },
- {
- "description": "徽章名,例如 pr 事件徽章名为:ci/status/pull_request, 如需获取 JSON 数据,可加上 .json 后缀,如:ci/status/pull_request.json",
- "in": "path",
- "name": "badge",
- "required": true,
- "type": "string"
- },
- {
- "description": "GetBadge params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.GetBadgeReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.GetBadgeResult"
- }
- }
- }
- }
- },
- "/{repo}/-/badge/list": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-commit-status:r",
- "operationId": "ListBadge",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Badge"
- ],
- "summary": "获取徽章列表数据。List badge data",
- "parameters": [
- {
- "description": "仓库完整路径",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "ListBadge params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.ListBadgeReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.ListBadgeResult"
- }
- }
- }
- }
- },
- "/{repo}/-/badge/upload": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-commit-status:rw",
- "operationId": "UploadBadge",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Badge"
- ],
- "summary": "上传徽章数据。Upload badge data",
- "parameters": [
- {
- "description": "仓库完整路径",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "UploadBadge params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.UploadBadgeReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.UploadBadgeResult"
- }
- }
- }
- }
- },
- "/{repo}/-/build/ai/auto-pr": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "AiAutoPr",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Ai"
- ],
- "summary": "根据传入的需求内容和需求标题借助 AI 自动编码并提 PR。Automatically code and create a PR with AI based on the input requirement content and title.",
- "parameters": [
- {
- "description": "仓库完整路径",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "AI auto PR params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.AiAutoPrReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.AiAutoPrResult"
- }
- }
- }
- }
- },
- "/{repo}/-/build/logs": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:r",
- "operationId": "GetBuildLogs",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Build"
- ],
- "summary": "查询流水线构建列表。List pipeline builds.",
- "parameters": [
- {
- "description": "Repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Start date in \"YYYY-MM-DD\" format, e.g. \"2024-12-01\"",
- "in": "query",
- "name": "createTime",
- "type": "string"
- },
- {
- "description": "End date in \"YYYY-MM-DD\" format, e.g. \"2024-12-01\"",
- "in": "query",
- "name": "endTime",
- "type": "string"
- },
- {
- "description": "Event name, e.g. \"push\"",
- "in": "query",
- "name": "event",
- "type": "string"
- },
- {
- "description": "Pagination page number, default(1)",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "description": "Pagination page size, default(30), max(100)",
- "in": "query",
- "name": "pagesize",
- "type": "integer"
- },
- {
- "description": "Commit ID, e.g. \"2221d4535ec0c921bcd0858627c5025a871dd2b5\"",
- "in": "query",
- "name": "sha",
- "type": "string"
- },
- {
- "description": "Build SN, e.g. \"cnb-1qa-1i3f5ecau",
- "in": "query",
- "name": "sn",
- "type": "string"
- },
- {
- "description": "Source branch name, e.g. \"dev\"",
- "in": "query",
- "name": "sourceRef",
- "type": "string"
- },
- {
- "description": "Build status: \"pending\", \"success\", \"error\", \"cancel\"",
- "in": "query",
- "name": "status",
- "type": "string"
- },
- {
- "description": "Target branch name, e.g. \"main\"",
- "in": "query",
- "name": "targetRef",
- "type": "string"
- },
- {
- "description": "User ID",
- "in": "query",
- "name": "userId",
- "type": "string"
- },
- {
- "description": "Username",
- "in": "query",
- "name": "userName",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.BuildLogsResult"
- }
- }
- }
- }
- },
- "/{repo}/-/build/logs/stage/{sn}/{pipelineId}/{stageId}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:r",
- "operationId": "GetBuildStage",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Build"
- ],
- "summary": "查询流水线Stage详情。Get pipeline build stage detail.",
- "parameters": [
- {
- "description": "Repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "SN",
- "in": "path",
- "name": "sn",
- "required": true,
- "type": "string"
- },
- {
- "description": "PipelineId",
- "in": "path",
- "name": "pipelineId",
- "required": true,
- "type": "string"
- },
- {
- "description": "stageId",
- "in": "path",
- "name": "stageId",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.BuildStageResult"
- }
- }
- }
- }
- },
- "/{repo}/-/build/logs/{sn}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:rw",
- "operationId": "BuildLogsDelete",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Build"
- ],
- "summary": "删除流水线日志内容。Delete pipeline logs content.",
- "parameters": [
- {
- "description": "Repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Sn",
- "in": "path",
- "name": "sn",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.BuildLogsDeleteResult"
- }
- }
- }
- }
- },
- "/{repo}/-/build/runner/download/log/{pipelineId}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:r",
- "operationId": "BuildRunnerDownloadLog",
- "consumes": null,
- "produces": null,
- "tags": [
- "Build"
- ],
- "summary": "流水线runner日志下载。Pipeline runner log download.",
- "parameters": [
- {
- "description": "Repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "PipelineId",
- "in": "path",
- "name": "pipelineId",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/build/start": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:rw",
- "operationId": "StartBuild",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Build"
- ],
- "summary": "开始一个构建。Start a build.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Build params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.StartBuildReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.BuildResult"
- }
- }
- }
- }
- },
- "/{repo}/-/build/status/{sn}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:r",
- "operationId": "GetBuildStatus",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Build"
- ],
- "summary": "查询流水线构建状态。Get pipeline build status.",
- "parameters": [
- {
- "description": "Repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "SN",
- "in": "path",
- "name": "sn",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.BuildStatusResult"
- }
- }
- }
- }
- },
- "/{repo}/-/build/stop/{sn}": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:rw",
- "operationId": "StopBuild",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Build"
- ],
- "summary": "停止一个构建。 Stop a build.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "SN",
- "in": "path",
- "name": "sn",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.BuildResult"
- }
- }
- }
- }
- },
- "/{repo}/-/commit-assets/download/{commit_id}/{filename}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r",
- "operationId": "GetCommitAssets",
- "consumes": null,
- "produces": null,
- "tags": [
- "Assets"
- ],
- "summary": "发起一个获取 commits 附件的请求,返回内容或者 302 到某个地址。Get a request to fetch a commit assets and returns the content directly or a 302 redirect to the assets URL.",
- "parameters": [
- {
- "description": "Repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "commit hash,eg: 3bba1ce6a8c35ee1264c7449f4f0b512bd751eac",
- "in": "path",
- "name": "commit_id",
- "required": true,
- "type": "string"
- },
- {
- "description": "filename,eg: test.png",
- "in": "path",
- "name": "filename",
- "required": true,
- "type": "string"
- },
- {
- "default": false,
- "description": "true 的话 302 的下载地址有效期为12个小时,但最多只能下载10次",
- "in": "query",
- "name": "share",
- "type": "boolean"
- }
- ],
- "responses": {
- "302": {
- "description": "Found"
- }
- }
- }
- },
- "/{repo}/-/git/archive-commit-changed-files/{sha1}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetArchiveCommitChangedFiles",
- "consumes": null,
- "produces": null,
- "tags": [
- "Git"
- ],
- "summary": "打包下载 commit 变更文件。Download archive of changed files for a commit.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "commit sha",
- "in": "path",
- "name": "sha1",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/git/archive-compare-changed-files/{base_head}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetArchiveCompareChangedFiles",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "打包下载两次 ref 之间的变更文件。Download archive of changed files for a compare.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "base...head",
- "in": "path",
- "name": "base_head",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/git/blobs": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "CreateBlob",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "创建一个 blob。Create a blob.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "PostBlobForm",
- "in": "body",
- "name": "post_blob_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/branches": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "ListBranches",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询分支列表。List branches.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.Branch"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "CreateBranch",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "创建新分支。Create a new branch based on a start point.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Create BranchDetail Form",
- "in": "body",
- "name": "create_branch_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/branches/{branch}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "DeleteBranch",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "删除指定分支。Delete the specified branch.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "branch name",
- "in": "path",
- "name": "branch",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetBranch",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询指定分支。Get a branch.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "branch name",
- "in": "path",
- "name": "branch",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/commit-annotations-in-batch": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetCommitAnnotationsInBatch",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询指定 commit 的元数据。Get commit annotations in batch.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Get Commit Annotations In Batch Form",
- "in": "body",
- "name": "get_commit_annotations_form",
- "required": true,
- "schema": {
- "$ref": "#/definitions/web.GetCommitAnnotationsInBatchForm"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/web.CommitAnnotationInBatch"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/git/commit-annotations/{sha}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetCommitAnnotations",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询指定 commit 的元数据。Get commit annotations.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "commit hash",
- "in": "path",
- "name": "sha",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/web.CommitAnnotation"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "put": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "PutCommitAnnotations",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "设定指定 commit 的元数据。Put commit annotations.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "commit hash",
- "in": "path",
- "name": "sha",
- "required": true,
- "type": "string"
- },
- {
- "description": "Put Commit Annotations Form",
- "in": "body",
- "name": "put_commit_annotations_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/commit-annotations/{sha}/{key}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "DeleteCommitAnnotation",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "删除指定 commit 的元数据。Delete commit annotation.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "commit hash",
- "in": "path",
- "name": "sha",
- "required": true,
- "type": "string"
- },
- {
- "description": "commit annotation key",
- "in": "path",
- "name": "key",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/git/commit-assets/{sha1}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetCommitAssetsBySha",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询指定 commit 的附件。List commit assets.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "sha",
- "in": "path",
- "name": "sha1",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.CommitAsset"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/git/commit-assets/{sha1}/asset-upload-confirmation/{upload_token}/{asset_path}": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "PostCommitAssetUploadConfirmation",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "确认 Commit asset 上传完成。Confirm commit asset upload.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "sha",
- "in": "path",
- "name": "sha1",
- "required": true,
- "type": "string"
- },
- {
- "description": "upload token",
- "in": "path",
- "name": "upload_token",
- "required": true,
- "type": "string"
- },
- {
- "description": "commit asset path",
- "in": "path",
- "name": "asset_path",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/git/commit-assets/{sha1}/asset-upload-url": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "PostCommitAssetUploadURL",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "新增一个 Commit asset。Create a commit asset.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "sha",
- "in": "path",
- "name": "sha1",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Commit Asset Upload URL Form",
- "in": "body",
- "name": "create_commit_asset_upload_url_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/commit-assets/{sha1}/{asset_id}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "DeleteCommitAsset",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "删除指定 commit 的附件。Delete commit asset.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "sha",
- "in": "path",
- "name": "sha1",
- "required": true,
- "type": "string"
- },
- {
- "description": "asset id",
- "in": "path",
- "name": "asset_id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "204": {
- "description": "No Content"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/git/commit-statuses/{commitish}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetCommitStatuses",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询指定 commit 的 check statuses。List commit check statuses.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "commitish",
- "in": "path",
- "name": "commitish",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.CommitStatus"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/git/commits": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "ListCommits",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询 commit 列表。List commits.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "sha or branch",
- "in": "query",
- "name": "sha",
- "type": "string"
- },
- {
- "description": "commit author pattern",
- "in": "query",
- "name": "author",
- "type": "string"
- },
- {
- "description": "commit committer pattern",
- "in": "query",
- "name": "committer",
- "type": "string"
- },
- {
- "description": "commit since",
- "in": "query",
- "name": "since",
- "type": "string"
- },
- {
- "description": "commit until",
- "in": "query",
- "name": "until",
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.Commit"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/git/commits/{ref}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetCommit",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询指定 commit。Get a commit.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "ref",
- "in": "path",
- "name": "ref",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/compare/{base_head}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetCompareCommits",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "对比 base...head。Compare two commits.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "base...head",
- "in": "path",
- "name": "base_head",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/contents/{file_path}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetContent",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.raw+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询仓库文件列表或文件。List repository files or file.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "path",
- "in": "path",
- "name": "file_path",
- "required": true,
- "type": "string"
- },
- {
- "description": "ref",
- "in": "query",
- "name": "ref",
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/head": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetHead",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "获取仓库默认分支。Get the default branch of the repository.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/tag-annotations/{tag_with_key}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw",
- "operationId": "DeleteTagAnnotation",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "删除指定 tag 的元数据。Delete the metadata of the specified tag.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "tag with key",
- "in": "path",
- "name": "tag_with_key",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/git/tag-annotations/{tag}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r",
- "operationId": "GetTagAnnotations",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询指定 tag 的元数据。Query the metadata of the specified tag.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "tag",
- "in": "path",
- "name": "tag",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/web.TagAnnotation"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "put": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw",
- "operationId": "PutTagAnnotations",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "设定指定 tag 的元数据。Set the metadata of the specified tag.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "tag",
- "in": "path",
- "name": "tag",
- "required": true,
- "type": "string"
- },
- {
- "description": "Put Tag Annotations Form",
- "in": "body",
- "name": "put_tag_annotations_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/tags": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r",
- "operationId": "ListTags",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询标签列表。List tags.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.Tag"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "CreateTag",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "创建一个 tag。Create a tag.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "PostTagFrom",
- "in": "body",
- "name": "post_tag_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/git/tags/{tag}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw",
- "operationId": "DeleteTag",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "删除指定标签。Delete the specified tag.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "tag name",
- "in": "path",
- "name": "tag",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "204": {
- "description": "No Content"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r",
- "operationId": "GetTag",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Git"
- ],
- "summary": "查询指定 Tag。Get a tag.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "tag name",
- "in": "path",
- "name": "tag",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/issues": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListIssues",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "查询仓库的 Issues。List issues.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number. If the value is less than 1, it will automatically be adjusted to 1",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size. If the value is more than 100, it will automatically be adjusted to 100",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "description": "issue state open or closed",
- "in": "query",
- "name": "state",
- "type": "string"
- },
- {
- "description": "issue search key",
- "in": "query",
- "name": "keyword",
- "type": "string"
- },
- {
- "description": "issue priority example: -1P, -2P, P0, P1, P2, P3",
- "in": "query",
- "name": "priority",
- "type": "string"
- },
- {
- "description": "issue labels example: git,bug,feature",
- "in": "query",
- "name": "labels",
- "type": "string"
- },
- {
- "description": "issue authors name, example: 张三,李四",
- "in": "query",
- "name": "authors",
- "type": "string"
- },
- {
- "description": "issue assignees name, example: 张三,李四,-; - means assign to nobody",
- "in": "query",
- "name": "assignees",
- "type": "string"
- },
- {
- "description": "issue filter update time begin example: 2022-01-31",
- "in": "query",
- "name": "updated_time_begin",
- "type": "string"
- },
- {
- "description": "issue filter update time end, example: 2022-01-31",
- "in": "query",
- "name": "updated_time_end",
- "type": "string"
- },
- {
- "description": "issue filter close time begin example: 2022-01-31",
- "in": "query",
- "name": "close_time_begin",
- "type": "string"
- },
- {
- "description": "issue filter close time end, example: 2022-01-31",
- "in": "query",
- "name": "close_time_end",
- "type": "string"
- },
- {
- "description": "issue order, example: created_at, -updated_at, reference_count。‘-’ prefix means descending order",
- "in": "query",
- "name": "order_by",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.Issue"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "CreateIssue",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "创建一个 Issue。Create an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Issue Form",
- "in": "body",
- "name": "post_issue_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/issues/{number}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "GetIssue",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "查询指定的 Issues。Get an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "issue number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- }
- ],
- "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"
- }
- }
- }
- },
- "patch": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "UpdateIssue",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "更新一个 Issue。Update an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "issue number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- },
- {
- "description": "Patch Issue Form",
- "in": "body",
- "name": "patch_issue_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/issues/{number}/assignees": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "DeleteIssueAssignees",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "删除 Issue 中的 Assignees。 Removes one or more assignees from an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "issue number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Delete Issue Assignees Form",
- "in": "body",
- "name": "delete_issue_assignees_form",
- "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"
- }
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListIssueAssignees",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "查询指定 Issue 的 Assignees。 List repository issue assignees.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "issue number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.UserInfo"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "patch": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PatchIssueAssignees",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "更新 Issue 中的 Assignees。 Updates the assignees of an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "issue number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Patch Issue Assignees Form",
- "in": "body",
- "name": "patch_issue_assignees_form",
- "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"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PostIssueAssignees",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "添加 Assignees 到指定的 Issue。 Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "issue number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Issue Assignees Form",
- "in": "body",
- "name": "post_issue_assignees_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/issues/{number}/assignees/{assignee}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "CanUserBeAssignedToIssue",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "检查用户是否可以被添加到 Issue 的 Assignees 中。 Checks if a user can be assigned to an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "issue number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "assignee",
- "in": "path",
- "name": "assignee",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "204": {
- "description": "No Content"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/issues/{number}/comments": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListIssueComments",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "查询仓库的 Issue 评论列表。List repository issue comments.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "issue number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.IssueComment"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PostIssueComment",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "创建一个 Issue Comment。Create an issue comment.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- },
- {
- "description": "Post Issue Comment Form",
- "in": "body",
- "name": "post_issue_comment_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/issues/{number}/comments/{comment_id}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "GetIssueComment",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "获取一个 Issue Comment。Get an issue comment.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "comment_id",
- "in": "path",
- "name": "comment_id",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- },
- "patch": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PatchIssueComment",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "修改一个 Issue Comment。Update an issue comment.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- },
- {
- "description": "comment_id",
- "in": "path",
- "name": "comment_id",
- "required": true,
- "type": "integer"
- },
- {
- "description": "Patch Issue Comment Form",
- "in": "body",
- "name": "patch_issue_comment_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/issues/{number}/labels": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "DeleteIssueLabels",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "清空 Issue 标签。Remove all labels from an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- }
- ],
- "responses": {
- "204": {
- "description": "No Content"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListIssueLabels",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "查询 Issue 的标签(label) 列表。List labels for an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.Label"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PostIssueLabels",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "新增 Issue 标签。Add labels to an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- },
- {
- "description": "Post Issue Labels Form",
- "in": "body",
- "name": "post_issue_labels_form",
- "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"
- }
- }
- }
- },
- "put": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PutIssueLabels",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "设置 Issue 标签。 Set the new labels for an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- },
- {
- "description": "Put Issue Labels Form",
- "in": "body",
- "name": "put_issue_labels_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/issues/{number}/labels/{name}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "DeleteIssueLabel",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Issues"
- ],
- "summary": "删除 Issue 标签。Remove a label from an issue.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- },
- {
- "description": "label name",
- "in": "path",
- "name": "name",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/knowledge/base": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "DeleteKnowledgeBase",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "KnowledgeBase"
- ],
- "summary": "删除知识库",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetKnowledgeBaseInfo",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "KnowledgeBase"
- ],
- "summary": "获取知识库信息",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.KnowledgeBaseInfoRes"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/knowledge/base/query": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "QueryKnowledgeBase",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "KnowledgeBase"
- ],
- "summary": "查询知识库,使用文档:https://docs.cnb.cool/zh/ai/knowledge-base.html",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "查询内容",
- "in": "body",
- "name": "query",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.QueryKnowledgeBaseReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.QueryKnowledgeBaseRes"
- },
- "type": "array"
- }
- },
- "400": {
- "description": "Bad Request",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/knowledge/embedding/models": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetModels",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "KnowledgeBase"
- ],
- "summary": "获取当前支持的 Embedding 模型列表",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.EmbeddingModel"
- },
- "type": "array"
- }
- },
- "400": {
- "description": "Bad Request",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/labels": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListLabels",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "RepoLabels"
- ],
- "summary": "查询仓库的标签(label) 列表。List repository labels.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "description": "label search key",
- "in": "query",
- "name": "keyword",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.Label"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PostLabel",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "RepoLabels"
- ],
- "summary": "创建一个 标签。Create a label.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Label Form",
- "in": "body",
- "name": "post_label_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/labels/{name}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "DeleteLabel",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "RepoLabels"
- ],
- "summary": "删除指定的仓库标签 label。Delete the specified repository label.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "label name",
- "in": "path",
- "name": "name",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "204": {
- "description": "No Content"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "patch": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PatchLabel",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "RepoLabels"
- ],
- "summary": "更新标签信息。Update label information.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "label name",
- "in": "path",
- "name": "name",
- "required": true,
- "type": "string"
- },
- {
- "description": "Patch Label Form",
- "in": "body",
- "name": "patch_label_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pull-in-batch": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:r",
- "operationId": "ListPullsByNumbers",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "根据numbers查询 Pull 列表。List pull requests by numbers.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "pull request numbers",
- "in": "query",
- "name": "n",
- "required": true,
- "type": "array"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.PullRequestInfo"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:r",
- "operationId": "ListPulls",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "查询 Pull 列表。List pull requests.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "default": "open",
- "description": "pull state `open`,`closed`, `all`",
- "in": "query",
- "name": "state",
- "type": "string"
- },
- {
- "description": "pull authors name, example: 张三,李四",
- "in": "query",
- "name": "authors",
- "type": "string"
- },
- {
- "description": "pull reviewers name, example: 张三,李四; - means nobody to review",
- "in": "query",
- "name": "reviewers",
- "type": "string"
- },
- {
- "description": "pull assignees name, example: 张三,李四,-; - means assign to nobody",
- "in": "query",
- "name": "assignees",
- "type": "string"
- },
- {
- "description": "pull base ref, example: refs/heads/master",
- "in": "query",
- "name": "base_ref",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.PullRequest"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:rw",
- "operationId": "PostPull",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "新增一个 Pull。Create a pull request.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Pull Request Form",
- "in": "body",
- "name": "post_pull_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:r",
- "operationId": "GetPull",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "查询指定 Pull。Get a pull request.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "pull request number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- },
- "patch": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:rw",
- "operationId": "PatchPull",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "更新一个 Pull Request。Update a pull request.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Pull Request Number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Update Pull Request Form",
- "in": "body",
- "name": "update_pull_request_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/assignees": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "DeletePullAssignees",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "删除 PullRequest 中的 Assignees。 Removes one or more assignees from a pull request.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Delete Pull Assignees Form",
- "in": "body",
- "name": "delete_pull_assignees_form",
- "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"
- }
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListPullAssignees",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "查询指定 PullRequest 的 Assignees。List repository pull request assignees.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "pull request number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.UserInfo"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PostPullAssignees",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "添加 Assignees 到指定的 PullRequest。 Adds up to 10 assignees to a pull request. Users already assigned to an issue are not replaced.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Pull Assignees Form",
- "in": "body",
- "name": "post_pull_assignees_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/assignees/{assignee}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "CanUserBeAssignedToPull",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "检查用户是否可以被添加到 PullRequest 的 Assignees 中。 Checks if a user can be assigned to a pull request.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "assignee",
- "in": "path",
- "name": "assignee",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "204": {
- "description": "No Content"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/comments": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListPullComments",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "查询 Pull Comments 列表。List pull comments requests.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.PullRequestComment"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PostPullComment",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "新增一个 Pull Comment。Create a pull comment.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Pull Request Comment Form",
- "in": "body",
- "name": "post_pull_comment_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/comments/{comment_id}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "GetPullComment",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "获取一个 Pull Comment。Get a pull comment.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "comment_id",
- "in": "path",
- "name": "comment_id",
- "required": true,
- "type": "integer"
- }
- ],
- "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"
- }
- }
- }
- },
- "patch": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PatchPullComment",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "更新一个 Pull Comment。Update a pull comment.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "comment_id",
- "in": "path",
- "name": "comment_id",
- "required": true,
- "type": "integer"
- },
- {
- "description": "Patch Pull Comment Form",
- "in": "body",
- "name": "patch_pull_comment_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/commit-statuses": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:r",
- "operationId": "ListPullCommitStatuses",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "查询 Pull 的状态检查",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "pull number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/commits": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListPullCommits",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "查询指定 PullRequest 的提交列表。Lists the commits in a specified pull request.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "pull request number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.Commit"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/files": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListPullFiles",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "查询指定 PullRequest 的文件列表。Lists the files in a specified pull request.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "pull request number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.PullFile"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/labels": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "DeletePullLabels",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "清空 Pull 标签。Remove all labels from a pull.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "204": {
- "description": "No Content"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListPullLabels",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "查询 Pull 的标签(label) 列表。List labels for a pull.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.Label"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PostPullLabels",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "新增 Pull 标签。Add labels to a pull.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Pull Labels Form",
- "in": "body",
- "name": "post_pull_labels_form",
- "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"
- }
- }
- }
- },
- "put": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PutPullLabels",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "设置 Pull 标签。Set the new labels for a pull.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Put Pull Labels Form",
- "in": "body",
- "name": "put_pull_labels_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/labels/{name}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "DeletePullLabel",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "删除 Pull 标签。Remove a label from a pull.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "label name",
- "in": "path",
- "name": "name",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/merge": {
- "put": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-pr:rw",
- "operationId": "MergePull",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "合并一个 Pull Request。Merge a pull request.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Pull Request Number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Merge Pull Request Form",
- "in": "body",
- "name": "merge_pull_request_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/reviews": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListPullReviews",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "查询特定 pull reviews 列表。List pull reviews.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.PullReview"
- },
- "type": "array"
- }
- },
- "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"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:rw",
- "operationId": "PostPullReview",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "新增一次 pull request 评审。Create a pull review.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Pull Review Form",
- "in": "body",
- "name": "post_pull_review_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/pulls/{number}/reviews/{review_id}/comments": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-notes:r",
- "operationId": "ListPullReviewComments",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Pulls"
- ],
- "summary": "查询指定 Pull Review Comments 列表评论。List pull review comments.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "pull request number",
- "in": "path",
- "name": "number",
- "required": true,
- "type": "integer"
- },
- {
- "description": "pull request review id",
- "in": "path",
- "name": "review_id",
- "required": true,
- "type": "integer"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.PullReviewComment"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/releases": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "ListReleases",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Releases"
- ],
- "summary": "查询 release 列表。List releases.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 30,
- "description": "pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.Release"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "PostRelease",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Releases"
- ],
- "summary": "新增一个 Release。Create a release.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Release Form, attachment is optional",
- "in": "body",
- "name": "create_release_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/releases/download/{tag}/{filename}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r",
- "operationId": "GetReleasesAsset",
- "consumes": null,
- "produces": null,
- "tags": [
- "Assets"
- ],
- "summary": "发起一个获取 release 附件的请求,返回内容或者 302 到某个地址。Initiate a request to get release attachments, returns content or 302 redirect.",
- "parameters": [
- {
- "description": "Repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "tag name(e.g. v1.0)",
- "in": "path",
- "name": "tag",
- "required": true,
- "type": "string"
- },
- {
- "description": "filename (e.g. test.png)",
- "in": "path",
- "name": "filename",
- "required": true,
- "type": "string"
- },
- {
- "default": false,
- "description": "true 的话 302 的下载地址有效期为12个小时,但最多只能下载10次",
- "in": "query",
- "name": "share",
- "type": "boolean"
- }
- ],
- "responses": {
- "302": {
- "description": "Found"
- }
- }
- }
- },
- "/{repo}/-/releases/latest": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetLatestRelease",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Releases"
- ],
- "summary": "查询 latest release。Query the latest release.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/releases/latest/download/{fileName}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:r",
- "operationId": "GetLatestReleasesAsset",
- "consumes": null,
- "produces": null,
- "tags": [
- "Assets"
- ],
- "summary": "发起一个获取 latest release 附件的请求,返回内容或者 302 到某个地址。Initiate a request to get latest release attachments, returns content or 302 redirect.",
- "parameters": [
- {
- "description": "Repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "File name, eg: test.png",
- "in": "path",
- "name": "fileName",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "302": {
- "description": "Found"
- }
- }
- }
- },
- "/{repo}/-/releases/tags/{tag}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetReleaseByTag",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Releases"
- ],
- "summary": "通过 tag 查询指定 release,包含附件信息。Get a release by tag, include assets information.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "tag name",
- "in": "path",
- "name": "tag",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/releases/{release_id}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "DeleteRelease",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Releases"
- ],
- "summary": "删除指定的 release。Delete a release.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "release id",
- "in": "path",
- "name": "release_id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetReleaseByID",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Releases"
- ],
- "summary": "根据 id\t查询指定 release, 包含附件信息。Get a release by id, include assets information.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "release id",
- "in": "path",
- "name": "release_id",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- },
- "patch": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "PatchRelease",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Releases"
- ],
- "summary": "更新 release。Update a release.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "release id",
- "in": "path",
- "name": "release_id",
- "required": true,
- "type": "string"
- },
- {
- "description": "patch release form",
- "in": "body",
- "name": "patch_release_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/releases/{release_id}/asset-upload-confirmation/{upload_token}/{asset_path}": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "PostReleaseAssetUploadConfirmation",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Releases"
- ],
- "summary": "确认 Release asset 上传完成。Confirm release asset upload.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "release id",
- "in": "path",
- "name": "release_id",
- "required": true,
- "type": "string"
- },
- {
- "description": "upload token",
- "in": "path",
- "name": "upload_token",
- "required": true,
- "type": "string"
- },
- {
- "description": "release asset path",
- "in": "path",
- "name": "asset_path",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/releases/{release_id}/asset-upload-url": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "PostReleaseAssetUploadURL",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Releases"
- ],
- "summary": "新增一个 Release asset。Create a release asset.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "release id",
- "in": "path",
- "name": "release_id",
- "required": true,
- "type": "string"
- },
- {
- "description": "Post Release Asset Upload URL Form",
- "in": "body",
- "name": "create_release_asset_upload_url_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/releases/{release_id}/assets/{asset_id}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:rw",
- "operationId": "DeleteReleaseAsset",
- "consumes": null,
- "produces": null,
- "tags": [
- "Releases"
- ],
- "summary": "删除指定的 release asset。Delete the specified release asset.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "release id",
- "in": "path",
- "name": "release_id",
- "required": true,
- "type": "string"
- },
- {
- "description": "asset id",
- "in": "path",
- "name": "asset_id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r",
- "operationId": "GetReleaseAsset",
- "consumes": null,
- "produces": null,
- "tags": [
- "Releases"
- ],
- "summary": "查询指定的 release asset。Get the specified release asset.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "release id",
- "in": "path",
- "name": "release_id",
- "required": true,
- "type": "string"
- },
- {
- "description": "asset id",
- "in": "path",
- "name": "asset_id",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/security/overview": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-security:r",
- "operationId": "GetRepoSecurityOverview",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Security"
- ],
- "summary": "查询仓库安全模块概览数据。Query the security overview data of a repository",
- "parameters": [
- {
- "description": "仓库名称",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "类型,多个类型用逗号分隔code_sensitive,code_vulnerability,为空默认查询所有类型",
- "in": "query",
- "name": "types",
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/settings/branch-protections": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r",
- "operationId": "ListBranchProtections",
- "consumes": null,
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "查询仓库保护分支规则列表。List branch protection rules.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/api.BranchProtection"
- },
- "type": "array"
- }
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw",
- "operationId": "PostBranchProtection",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "新增仓库保护分支规则。Create branch protection rule.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Branch Protection Form",
- "in": "body",
- "name": "branch_protection_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/settings/branch-protections/{id}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw",
- "operationId": "DeleteBranchProtection",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "删除仓库保护分支规则。 Delete branch protection rule.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Branch Protection id",
- "in": "path",
- "name": "id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r",
- "operationId": "GetBranchProtection",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "查询仓库保护分支规则。Get branch protection rule.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "branch protection id",
- "in": "path",
- "name": "id",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- },
- "patch": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw",
- "operationId": "PatchBranchProtection",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "更新仓库保护分支规则。Update branch protection rule.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Branch Protection id",
- "in": "path",
- "name": "id",
- "required": true,
- "type": "string"
- },
- {
- "description": "Branch Protection Form",
- "in": "body",
- "name": "branch_protection_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/settings/cloud-native-build": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r",
- "operationId": "GetPipelineSettings",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "查询仓库云原生构建设置。List pipeline settings.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- },
- "put": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw",
- "operationId": "PutPipelineSettings",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "更新仓库云原生构建设置。Update pipeline settings.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Cloud Native Build Form",
- "in": "body",
- "name": "pipeline_form",
- "required": true,
- "schema": {
- "$ref": "#/definitions/web.PipelineSettings"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- },
- "500": {
- "description": "Internal Server Error",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{repo}/-/settings/pull-request": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r",
- "operationId": "GetPullRequestSettings",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "查询仓库合并请求设置。List pull request settings.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- },
- "put": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw",
- "operationId": "PutPullRequestSettings",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "更新仓库合并请求设置。Set pull request settings.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Pull Request Form",
- "in": "body",
- "name": "pull_request_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/settings/push-limit": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:r",
- "operationId": "GetPushLimitSettings",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "查询仓库推送设置。List push limit settings.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- }
- ],
- "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"
- }
- }
- }
- },
- "put": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw",
- "operationId": "PutPushLimitSettings",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "GitSettings"
- ],
- "summary": "设置仓库推送设置。Set push limit settings.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "Push Limit Form",
- "in": "body",
- "name": "push_limit_form",
- "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"
- }
- }
- }
- }
- },
- "/{repo}/-/settings/set_visibility": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw",
- "operationId": "SetRepoVisibility",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Repositories"
- ],
- "summary": "改变仓库可见性",
- "parameters": [
- {
- "description": "repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "仓库可见性",
- "enum": [
- "Private",
- "Public",
- "Secret"
- ],
- "in": "query",
- "name": "visibility",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{repo}/-/transfer": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-manage:rw,repo-code:rw",
- "operationId": "TransferRepo",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Repositories"
- ],
- "summary": "转移仓库",
- "parameters": [
- {
- "description": "slug",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "request",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.TransferSlugReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/{repo}/-/upload/files": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw",
- "operationId": "UploadFiles",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Assets"
- ],
- "summary": "发起一个上传 files 的请求,返回上传文件的url,请使用 put 发起流式上传。Initiate a request to upload files,returns upload URL.Use PUT to initiate a stream upload.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "UploadRequestParams",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.UploadRequestParams"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.UploadAssetsResponse"
- }
- }
- }
- }
- },
- "/{repo}/-/upload/imgs": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw",
- "operationId": "UploadImgs",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Assets"
- ],
- "summary": "发起一个上传 imgs 的请求,返回上传文件的url,请使用 put 发起流式上传。Initiate a request to upload images,returns upload URL.Use PUT to initiate a stream upload.",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "UploadRequestParams",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.UploadRequestParams"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.UploadAssetsResponse"
- }
- }
- }
- }
- },
- "/{repo}/-/upload/releases/{tagName}": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw",
- "operationId": "UploadReleases",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Assets"
- ],
- "summary": "发起一个上传 release 附件的请求,返回上传文件的url,附件上限是64GiB。请使用 put 发起流式上传。",
- "parameters": [
- {
- "description": "repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "tag_name",
- "in": "path",
- "name": "tagName",
- "required": true,
- "type": "string"
- },
- {
- "description": "UploadRequestParams",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.UploadRequestParams"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.UploadAssetsResponse"
- }
- }
- }
- }
- },
- "/{repo}/-/upload/wiki/{branchName}": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-contents:rw",
- "operationId": "UploadWikiFile",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "wiki"
- ],
- "summary": "发起一个上传 wiki 文件的请求,返回上传文件的url,请使用 put 发起流式上传。Initiate a request to upload wiki files,returns upload URL.Use PUT to initiate a stream upload.",
- "parameters": [
- {
- "description": "Repo",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "branchName",
- "in": "path",
- "name": "branchName",
- "required": true,
- "type": "string"
- },
- {
- "description": "UploadRequestParams",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.UploadRequestParams"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.UploadAssetsResponse"
- }
- }
- }
- }
- },
- "/{repo}/-/workspace/detail/{sn}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-detail:r",
- "operationId": "GetWorkspaceDetail",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Workspace"
- ],
- "summary": "根据流水线sn查询云原生开发访问地址。Query cloud-native development access address by pipeline SN.",
- "parameters": [
- {
- "description": "Repo path",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "SN",
- "in": "path",
- "name": "sn",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.WorkspaceDetailResult"
- }
- }
- }
- }
- },
- "/{repo}/-/workspace/start": {
- "post": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-cnb-trigger:rw",
- "operationId": "StartWorkspace",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json",
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Workspace"
- ],
- "summary": "启动云原生开发环境,已存在环境则直接打开,否则重新创建开发环境。Start cloud-native dev. Opens existing env or creates a new one.",
- "parameters": [
- {
- "description": "仓库完整路径",
- "in": "path",
- "name": "repo",
- "required": true,
- "type": "string"
- },
- {
- "description": "StartWorkspace params",
- "in": "body",
- "name": "request",
- "required": true,
- "schema": {
- "$ref": "#/definitions/dto.StartWorkspaceReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.StartWorkspaceResult"
- }
- }
- }
- }
- },
- "/{slug}/-/packages": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r",
- "operationId": "ListPackages",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "查询制品列表。 List all packages.",
- "parameters": [
- {
- "description": "Slug",
- "in": "path",
- "name": "slug",
- "required": true,
- "type": "string"
- },
- {
- "description": "Type 选项all仅包含仓库下的docker/helm/docker-model类型",
- "enum": [
- "all",
- "docker",
- "helm",
- "docker-model",
- "maven",
- "npm",
- "ohpm",
- "pypi",
- "nuget",
- "composer",
- "conan"
- ],
- "in": "query",
- "name": "type",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "description": "Ordering type",
- "enum": [
- "pull_count",
- "last_push_at",
- "name_ascend",
- "name_descend"
- ],
- "in": "query",
- "name": "ordering",
- "type": "string"
- },
- {
- "description": "Key word to search package name",
- "in": "query",
- "name": "name",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.Package"
- },
- "type": "array"
- }
- },
- "400": {
- "description": "Bad Request",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- },
- "head": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r",
- "operationId": "HeadPackages",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "查询制品数量。 Head all packages.",
- "parameters": [
- {
- "description": "Slug",
- "in": "path",
- "name": "slug",
- "required": true,
- "type": "string"
- },
- {
- "description": "Type",
- "enum": [
- "all",
- "docker",
- "helm",
- "docker-model"
- ],
- "in": "query",
- "name": "type",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "description": "Ordering type",
- "enum": [
- "pull_count",
- "last_push_at",
- "name_ascend",
- "name_descend"
- ],
- "in": "query",
- "name": "ordering",
- "type": "string"
- },
- {
- "description": "key word to search package",
- "in": "query",
- "name": "name",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "400": {
- "description": "Bad Request"
- }
- }
- }
- },
- "/{slug}/-/packages/{type}/{name}": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r",
- "operationId": "GetPackage",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.web+json",
- "application/vnd.cnb.api+json"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "获取某一制品的详细信息。 Get the package detail.",
- "parameters": [
- {
- "description": "Slug",
- "in": "path",
- "name": "slug",
- "required": true,
- "type": "string"
- },
- {
- "description": "Type",
- "enum": [
- "docker",
- "helm",
- "docker-model",
- "maven",
- "npm",
- "ohpm",
- "pypi",
- "nuget",
- "composer",
- "conan"
- ],
- "in": "path",
- "name": "type",
- "required": true,
- "type": "string"
- },
- {
- "description": "Name",
- "in": "path",
- "name": "name",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.PackageDetail"
- }
- }
- }
- }
- },
- "/{slug}/-/packages/{type}/{name}/-/tag/{tag}": {
- "delete": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package-delete:rw",
- "operationId": "DeletePackageTag",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "删除制品标签。 Delete the specific tag under specific package",
- "parameters": [
- {
- "description": "Slug",
- "in": "path",
- "name": "slug",
- "required": true,
- "type": "string"
- },
- {
- "description": "Type",
- "enum": [
- "docker",
- "helm",
- "docker-model",
- "maven",
- "npm",
- "ohpm",
- "pypi",
- "nuget",
- "composer",
- "conan"
- ],
- "in": "path",
- "name": "type",
- "required": true,
- "type": "string"
- },
- {
- "description": "Name",
- "in": "path",
- "name": "name",
- "required": true,
- "type": "string"
- },
- {
- "description": "Tag",
- "in": "path",
- "name": "tag",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- },
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r",
- "operationId": "GetPackageTagDetail",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "获取制品标签详情。 Get the specific tag under specific package.",
- "parameters": [
- {
- "description": "Slug",
- "in": "path",
- "name": "slug",
- "required": true,
- "type": "string"
- },
- {
- "description": "Type",
- "enum": [
- "docker",
- "helm",
- "docker-model",
- "maven",
- "npm",
- "ohpm",
- "pypi",
- "nuget",
- "composer",
- "conan"
- ],
- "in": "path",
- "name": "type",
- "required": true,
- "type": "string"
- },
- {
- "description": "Name",
- "in": "path",
- "name": "name",
- "required": true,
- "type": "string"
- },
- {
- "description": "Tag",
- "in": "path",
- "name": "tag",
- "required": true,
- "type": "string"
- },
- {
- "description": "摘要",
- "in": "query",
- "name": "sha256",
- "type": "string"
- },
- {
- "description": "架构,docker制品必需,例: linux/amd64/v3。required for docker artifacts",
- "in": "query",
- "name": "arch",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.TagDetail"
- }
- }
- }
- }
- },
- "/{slug}/-/packages/{type}/{pkgname}/-/tags": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r",
- "operationId": "ListPackageTags",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "查询制品标签列表。 List all tags under specific package.",
- "parameters": [
- {
- "description": "Slug",
- "in": "path",
- "name": "slug",
- "required": true,
- "type": "string"
- },
- {
- "description": "Type",
- "enum": [
- "docker",
- "helm",
- "docker-model",
- "maven",
- "npm",
- "ohpm",
- "pypi",
- "nuget",
- "composer",
- "conan"
- ],
- "in": "path",
- "name": "type",
- "required": true,
- "type": "string"
- },
- {
- "description": "Package name",
- "in": "path",
- "name": "pkgname",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "description": "Ordering type",
- "enum": [
- "pull_count",
- "last_push_at"
- ],
- "in": "query",
- "name": "ordering",
- "type": "string"
- },
- {
- "description": "Key word",
- "in": "query",
- "name": "name",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.Tag"
- }
- }
- }
- }
- },
- "/{slug}/-/registry/-/quota": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r",
- "operationId": "GetRegistryQuota",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "查询制品配额。 Get quota of specific registry.",
- "parameters": [
- {
- "description": "Slug",
- "in": "path",
- "name": "slug",
- "required": true,
- "type": "string"
- },
- {
- "description": "Type",
- "enum": [
- "docker",
- "helm",
- "docker-model",
- "maven",
- "npm",
- "ohpm",
- "pypi",
- "nuget",
- "composer",
- "conan"
- ],
- "in": "query",
- "name": "type",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/dto.RegistryLevelQuotaRsp"
- }
- },
- "400": {
- "description": "Bad Request",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{slug}/-/registry/-/quotas": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r",
- "operationId": "GetRegistryQuotas",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "查询全部制品配额。 Get quotas of packages under one registry.",
- "parameters": [
- {
- "description": "Slug",
- "in": "path",
- "name": "slug",
- "required": true,
- "type": "string"
- },
- {
- "description": "Type",
- "enum": [
- "docker",
- "helm",
- "docker-model",
- "maven",
- "npm",
- "ohpm",
- "pypi",
- "nuget",
- "composer",
- "conan"
- ],
- "in": "query",
- "name": "type",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "description": "Ordering type",
- "enum": [
- "used_ascend",
- "used_descend"
- ],
- "in": "query",
- "name": "ordering",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.QuotaRsp"
- },
- "type": "array"
- }
- },
- "400": {
- "description": "Bad Request",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- },
- "/{slug}/-/registry/-/quotas/download": {
- "get": {
- "security": [
- {
- "BearerAuth": []
- }
- ],
- "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-package:r",
- "operationId": "DownloadRegistryQuotas",
- "consumes": null,
- "produces": [
- "application/vnd.cnb.api+json",
- "application/vnd.cnb.web+json",
- "application/octet-stream"
- ],
- "tags": [
- "Artifactory"
- ],
- "summary": "下载制品配额信息。 Download registry quota details.",
- "parameters": [
- {
- "description": "Slug",
- "in": "path",
- "name": "slug",
- "required": true,
- "type": "string"
- },
- {
- "description": "Type",
- "enum": [
- "docker",
- "helm",
- "docker-model",
- "maven",
- "npm",
- "ohpm",
- "pypi",
- "nuget",
- "composer",
- "conan"
- ],
- "in": "query",
- "name": "type",
- "required": true,
- "type": "string"
- },
- {
- "default": 1,
- "description": "Pagination page number",
- "in": "query",
- "name": "page",
- "type": "integer"
- },
- {
- "default": 10,
- "description": "Pagination page size",
- "in": "query",
- "name": "page_size",
- "type": "integer"
- },
- {
- "description": "Ordering type",
- "enum": [
- "used_ascend",
- "used_descend"
- ],
- "in": "query",
- "name": "ordering",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "items": {
- "$ref": "#/definitions/dto.QuotaRsp"
- },
- "type": "array"
- }
- },
- "400": {
- "description": "Bad Request",
- "schema": {
- "$ref": "#/definitions/die.WebError"
- }
- }
- }
- }
- }
- },
- "securityDefinitions": {
- "BearerAuth": {
- "description": "Type \"Bearer 1Z1609lSrSizKnLxEWx6WLr3lvA\".",
- "in": "header",
- "name": "Authorization",
- "type": "apiKey"
- }
- }
-}
\ No newline at end of file
diff --git a/test/common.ts b/test/common.ts
index ef0030a..3f689d2 100644
--- a/test/common.ts
+++ b/test/common.ts
@@ -5,10 +5,22 @@ const cnb = new CNB(process.env.CNB_TOKEN || "");
const worksaceList = await cnb.workspace.list();
-// console.log("worksaceList", worksaceList);
+console.log("worksaceList", worksaceList);
-const sn = 'cnb-0eg-1jbkjj615-001'
+// const sn = 'cnb-o18-1jbklfuoh'
-const worksace = await cnb.workspace.getDetail('kevisual/node24', sn)
-console.log("worksace", worksace);
\ No newline at end of file
+// const worksace = await cnb.workspace.getDetail('kevisual/cnb', sn)
+
+// console.log("worksace", worksace);
+
+// const stop = await cnb.workspace.stopWorkspace({ sn })
+
+// console.log("stop", stop);
+
+// exebqzp8sc
+// const start = await cnb.workspace.startWorkspace('kevisual/cnb', {
+// branch: 'main',
+// });
+
+// console.log("start", start);
\ No newline at end of file