GitSettings
获取保护分支规则。Get branch protection rule.
根据规则 ID 获取指定保护分支规则的详细配置,包括匹配模式、合并要求、推送管控、状态检查要求等。 Get detailed configuration of a specified branch protection rule by rule ID. Includes match pattern, merge requirements, push restrictions, and status check requirements. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:r
get/{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.
Response
OK
Changes
No recorded changes to this operation across all 1 revision of this API.