Closed
Description
- Gitea version (or commit ref): 1.10.0+dev-275-g72f6d5c88
Description
Currently, there's no way of knowing what branches are protected in a repo for simple users.
A PR is in the works (#7093) for configuring such information, but that is only for repo owner because it exposes whitelists and other sensitive information.
My proposal is to change /api/v1/repos/{owner}/{repo}/branches
and add the last two fields (protected
and required_approvals
), so anyone with read permissions on the repo can access this information:
[
{
"commit": {
"added": [
"string"
],
"author": {
"email": "user@example.com",
"name": "string",
"username": "string"
},
"committer": {
"email": "user@example.com",
"name": "string",
"username": "string"
},
"id": "string",
"message": "string",
"modified": [
"string"
],
"removed": [
"string"
],
"timestamp": "2019-09-11T19:38:32.417Z",
"url": "string",
"verification": {
"payload": "string",
"reason": "string",
"signature": "string",
"verified": true
}
},
"name": "string",
"protected": true,
"required_approvals": 2
}
]