文档

UpdateRepository - 更新代码库

更新代码库基本信息、常用设置。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

PUT /repository/{repositoryId}

请求参数

名称类型必填描述示例值
organizationIdstring

企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】

60de7a6852743a5162b5f957
accessTokenstring

个人访问令牌。 使用阿里云 AK+SK 或使用 STS 临时授权方式不需要传该字段

c3c09f1230187a879678da43c973d069
repositoryIdlong

代码库 ID

2080398
bodyobject

请求 Body

idlong

代码库 ID

2080398
namestring

代码库名称

codeup
pathstring

代码库路径

codeup-demo
descriptionstring

代码库描述

codeup描述信息
defaultBranchstring

默认分支

master
issuesEnabledboolean

是否开启 issues 可选值:true / false

true
mergeRequestsEnabledboolean

是否开启代码合并 可选值:true / false

true
buildsEnabledboolean

是否开启构建 可选值:true / false

true
wikiEnabledboolean

是否开启 wiki 可选值:true / false

true
snippetsEnabledboolean

是否开启 snippets

false
visibilityLevelinteger

代码仓库可见性 0:私有,仅代码库成员可见 10:企业内公开,企业成员可见

0
checkEmailboolean

是否检查邮箱 可选值:true / false

true
avatarstring

头像地址

https://xxxx
openCloneDownloadControlboolean

是否开启克隆下载控制 可选值:true / false

false
projectCloneDownloadRoleListobject []

被允许的拉取代码角色列表

roleCodeinteger

角色代码 15:空间成员 60:空间管理员 70:空间拥有者

15
allowedboolean

是否允许 可选值:true / false

true
projectCloneDownloadMethodListobject []

被允许的拉取代码方法列表

permissionCodestring

clone 下载权限码 project:ssh-clone :允许 ssh clone project:http-clone:允许 http clone project:download:允许下载

project:download
allowedboolean

是否允许 可选值:true / false

true
adminSettingLanguagestring

仓库主要编程语言(需管理员权限)

Java

返回参数

名称类型描述示例值
object

Schema of Response

requestIdstring

请求 ID

EAE03103-5497-58D1-9169-E524DDE8604C
errorMessagestring

错误信息

“”
errorCodestring

错误码

SYSTEM_UNKNOWN_ERROR
successboolean

调用是否成功

true
resultobject

返回结果

idlong

代码库 ID

2825387
namestring

代码库名称

codeup
nameWithNamespacestring

代码库完整名称(含完整组名称)

codeup-test-org / codeup(斜杠两侧有空格)
pathstring

代码库路径

codeup
pathWithNamespacestring

代码库完整路径(含完整组路径)

codeup-test-org / codeup
descriptionstring

代码库描述

codeup代码库描述
defaultBranchstring

默认分支

master
visibilityLevelinteger

可见性 0:私有,仅代码库成员可见 10:企业内公开,企业成员可见

0
sshUrlToRepostring

代码库的 SSH 克隆地址

git@codeup.aliyun.com:xxx/test/test.git
httpUrlToRepostring

代码库的 HTTP 克隆地址

https://codeup.aliyun.com/xxx/test/test.git
webUrlstring

代码库的页面访问地址

https://codeup.aliyun.com/xxx/test/test
issuesEnabledboolean

是否开启 issues 可选值:true / false

true
mergeRequestsEnabledboolean

是否开启合并请求 可选值:true / false

true
buildsEnabledboolean

是否开启构建 可选值:true / false

false
wikiEnabledboolean

是否开启 wiki 可选值:true / false

true
snippetsEnabledboolean

是否开启 snippets 可选值:true / false

false
createdAtstring

创建时间

2022-03-18 14:24:54
lastActivityAtstring

最后活跃时间

2022-03-20 14:24:54
creatorIdlong

创建者 ID

19238
namespaceobject

代码库所属组或企业空间信息

idlong

组或企业空间 ID

29322
namestring

组或企业空间名称

codeup
pathstring

组或企业路径(判断父路径是组还是企业)

地址:https://codeup.aliyun.com/60d54f3daccf2bbd6659f3ad/blank923/repo-test 组路径:blank923 企业路径:60d54f3daccf2bbd6659f3ad
ownerIdlong

组或企业空间的拥有者 ID

19238
createdAtstring

创建时间

2022-02-18 14:24:54
updatedAtstring

更新时间

2022-03-18 14:24:54
descriptionstring

描述

组或企业空间的描述信息
avatarstring

空间的头像地址

https://xxx
visibilityLevelinteger

代码仓库可见性 0:私有 10:企业内公开,企业成员可见

0
archivedboolean

归档标识

false
avatarUrlstring

代码库的头像地址

https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100

示例

正常返回示例

JSON格式

{
  "requestId": "EAE03103-5497-58D1-9169-E524DDE8604C",
  "errorMessage": "“”",
  "errorCode": "SYSTEM_UNKNOWN_ERROR\n",
  "success": true,
  "result": {
    "id": 2825387,
    "name": "codeup",
    "nameWithNamespace": "codeup-test-org / codeup(斜杠两侧有空格)",
    "path": "codeup",
    "pathWithNamespace": "codeup-test-org / codeup",
    "description": "codeup代码库描述",
    "defaultBranch": "master",
    "visibilityLevel": 0,
    "sshUrlToRepo": "git@codeup.aliyun.com:xxx/test/test.git\n",
    "httpUrlToRepo": "https://codeup.aliyun.com/xxx/test/test.git\n",
    "webUrl": "https://codeup.aliyun.com/xxx/test/test\n",
    "issuesEnabled": true,
    "mergeRequestsEnabled": true,
    "buildsEnabled": false,
    "wikiEnabled": true,
    "snippetsEnabled": false,
    "createdAt": "2022-03-18 14:24:54",
    "lastActivityAt": "2022-03-20 14:24:54",
    "creatorId": 19238,
    "namespace": {
      "id": 29322,
      "name": "codeup",
      "path": "地址:https://codeup.aliyun.com/60d54f3daccf2bbd6659f3ad/blank923/repo-test\n组路径:blank923\n企业路径:60d54f3daccf2bbd6659f3ad",
      "ownerId": 19238,
      "createdAt": "2022-02-18 14:24:54",
      "updatedAt": "2022-03-18 14:24:54",
      "description": "组或企业空间的描述信息",
      "avatar": "https://xxx",
      "visibilityLevel": 0
    },
    "archived": false,
    "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100"
  }
}

错误码

HTTP status code错误码错误信息描述
403Forbidden.AccessDeniedThe user is not authorized to perform the operation.用户无权限执行相关操作
403Forbidden.UserNotAdminOrOwnerThe current user is not an admin or owner in the organization and is not authorized to perform the operation.当前用户非该企业管理员或拥有者,无权进行操作。
403Forbidden.UserNotInCurrentOrganizationThe user is not in the organization and is not authorized to perform the operation.当前用户不在该企业中,无权进行操作。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (0)
文档反馈