From 86cff86b46116353e4d6605ccf5a77a7ac65bc78 Mon Sep 17 00:00:00 2001 From: David Svantesson Date: Sat, 16 Nov 2019 20:39:18 +0100 Subject: Update branch API endpoint to show effective branch protection. (#9031) * Add API endpoint for displaying effective branch protection. * Add status checks. --- modules/structs/repo_branch.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'modules/structs') 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"` } -- cgit v1.2.3