GitSettings
更新保护分支规则。Update branch protection rule.
更新指定的保护分支规则配置。需要仓库 Master 权限。支持修改匹配模式、合并要求、推送管控等所有规则字段。 Update the configuration of a branch protection rule. Requires Master permission. Supports modifying all rule fields including match pattern, merge requirements, and push restrictions. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:rw
patch/{repo}/-/settings/branch-protections/{id}
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}/-/settings/branch-protections/{id}
- Auth: API key in header Authorization
Path parameters
repostring required
不带.git后缀的仓库名称。格式:组织名称/仓库名称。Repository name without .git suffix. Format: org/repo.
idstring required
保护分支规则唯一标识符。Branch protection rule unique identifier.
Request body
Response
OK
Changes
No recorded changes to this operation across all 1 revision of this API.