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 /modules/structs | |
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 'modules/structs')
-rw-r--r-- | modules/structs/repo_branch.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/structs/repo_branch.go b/modules/structs/repo_branch.go index a6ae6c1663..42bb763893 100644 --- a/modules/structs/repo_branch.go +++ b/modules/structs/repo_branch.go @@ -6,6 +6,12 @@ package structs // Branch represents a repository branch type Branch struct { - Name string `json:"name"` - Commit *PayloadCommit `json:"commit"` + Name string `json:"name"` + Commit *PayloadCommit `json:"commit"` + Protected bool `json:"protected"` + RequiredApprovals int64 `json:"required_approvals"` + EnableStatusCheck bool `json:"enable_status_check"` + StatusCheckContexts []string `json:"status_check_contexts"` + UserCanPush bool `json:"user_can_push"` + UserCanMerge bool `json:"user_can_merge"` } |