diff options
author | David Svantesson <davidsvantesson@gmail.com> | 2019-11-16 20:39:18 +0100 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-11-16 19:39:18 +0000 |
commit | 86cff86b46116353e4d6605ccf5a77a7ac65bc78 (patch) | |
tree | c4b0cefc24d333f64682d9b31a91ad42406a6aef /templates | |
parent | 3dfe9190b05b68497478324a776c1f80d6f5e56d (diff) | |
download | gitea-86cff86b46116353e4d6605ccf5a77a7ac65bc78.tar.gz gitea-86cff86b46116353e4d6605ccf5a77a7ac65bc78.zip |
Update branch API endpoint to show effective branch protection. (#9031)
* Add API endpoint for displaying effective branch protection.
* Add status checks.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index bebe85246c..6b424131c5 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1492,7 +1492,7 @@ "tags": [ "repository" ], - "summary": "Retrieve a specific branch from a repository", + "summary": "Retrieve a specific branch from a repository, including its effective branch protection", "operationId": "repoGetBranch", "parameters": [ { @@ -7583,9 +7583,37 @@ "commit": { "$ref": "#/definitions/PayloadCommit" }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, "name": { "type": "string", "x-go-name": "Name" + }, + "protected": { + "type": "boolean", + "x-go-name": "Protected" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "user_can_merge": { + "type": "boolean", + "x-go-name": "UserCanMerge" + }, + "user_can_push": { + "type": "boolean", + "x-go-name": "UserCanPush" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" |