跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support

Get whether a repository inherits the owner-level branch protection rules

GET
/repos/{owner}/{repo}/branch_protection_inheritance
curl --request GET \
--url https://gitea.example.com/api/v1/repos/example/example/branch_protection_inheritance \
--header 'Authorization: Basic <credentials>'

Gitea Enterprise only. This endpoint is not part of the community edition.

owner
required
string

Owner of the repo

repo
required
string

Name of the repo

RepoBranchProtectionInheritance

Media typeapplication/json
RepoBranchProtectionInheritance represents whether a repository inherits the branch protection rules defined at its owner level.
object
inherit

Whether the repository inherits the owner-level branch protection rules. This only takes effect when the owner does not force inheritance.

boolean
Examplegenerated
{
"inherit": true
}

APINotFound is a not found empty response

Media typeapplication/json