Update branch API endpoint to show effective branch protection. (#9031)

* Add API endpoint for displaying effective branch protection.

* Add status checks.
This commit is contained in:
David Svantesson authored and zeripath committed 2019-11-16 19:39:18 +00:00
1 parent 3dfe9190b0
commit 86cff86b46
5 files changed
+77 -9

No files matched your search

+8 -2
View File
@@ -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"`
}