APIs.io Engineering Platform · Schema
Branch Protection
Branch Protection
APIs.ioEngineeringPlatform
Properties
| Name | Type | Description |
|---|---|---|
| url | string | |
| enabled | boolean | |
| required_status_checks | object | |
| enforce_admins | object | |
| required_pull_request_reviews | object | |
| restrictions | object | |
| required_linear_history | object | |
| allow_force_pushes | object | |
| allow_deletions | object | |
| block_creations | object | |
| required_conversation_resolution | object | |
| name | string | |
| protection_url | string | |
| required_signatures | object | |
| lock_branch | object | Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. |
| allow_fork_syncing | object | Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/branch-protection",
"title": "Branch Protection",
"description": "Branch Protection",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"required_status_checks": {
"$ref": "#/components/schemas/protected-branch-required-status-check"
},
"enforce_admins": {
"$ref": "#/components/schemas/protected-branch-admin-enforced"
},
"required_pull_request_reviews": {
"$ref": "#/components/schemas/protected-branch-pull-request-review"
},
"restrictions": {
"$ref": "#/components/schemas/branch-restriction-policy"
},
"required_linear_history": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"allow_force_pushes": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"allow_deletions": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"block_creations": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"required_conversation_resolution": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"name": {
"type": "string",
"example": "\"branch/with/protection\""
},
"protection_url": {
"type": "string",
"example": "\"https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection\""
},
"required_signatures": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri",
"example": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures"
},
"enabled": {
"type": "boolean",
"example": true
}
},
"required": [
"url",
"enabled"
]
},
"lock_branch": {
"type": "object",
"description": "Whether to set the branch as read-only. If this is true, users will not be able to push to the branch.",
"properties": {
"enabled": {
"default": false,
"type": "boolean"
}
}
},
"allow_fork_syncing": {
"type": "object",
"description": "Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing.",
"properties": {
"enabled": {
"default": false,
"type": "boolean"
}
}
}
}
}