Git
获取默认分支。Get default branch.
获取仓库的默认分支(HEAD 指向)信息,包括分支名称及是否为保护分支。 Get the default branch (HEAD) information of the repository, including branch name and whether it is a protected branch. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r
get/{repo}/-/git/head
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/head
- Auth: API key in header Authorization
Path parameters
repostring required
不带.git后缀的仓库名称。格式:组织名称/仓库名称。Repository name without .git suffix. Format: org/repo.
Response
OK
Changes
No recorded changes to this operation across all 1 revision of this API.