Git
锁定分支。Lock branch.
锁定指定分支,锁定后禁止推送。适用于版本发布前需临时冻结分支的场景。 Lock the specified branch. Push operations will be blocked after locking. Suitable for scenarios requiring temporary branch freeze, such as pre-release code freeze. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:rw
post/{repo}/-/git/branch-locks/{branch}
Request
- Base URL: https://api.cnb.cool (the document declares no server; this is the origin it was published from)
- URL: https://api.cnb.cool/{repo}/-/git/branch-locks/{branch}
- Auth: API key in header Authorization
Path parameters
repostring required
不带.git后缀的仓库名称。格式:组织名称/仓库名称。Repository name without .git suffix. Format: org/repo.
branchstring required
分支名称. Branch name.
Response
Created
Changes
No recorded changes to this operation across all 1 revision of this API.