(branch, project string, opts *gitlab.ProtectBranchOptions)
| 86 | } |
| 87 | |
| 88 | func protectBranch(branch, project string, opts *gitlab.ProtectBranchOptions) (*gitlab.Branch, error) { |
| 89 | git, err := newGitlabClient() |
| 90 | if err != nil { |
| 91 | return nil, err |
| 92 | } |
| 93 | protectedBranch, _, err := git.Branches.ProtectBranch(project, branch, opts) |
| 94 | if err != nil { |
| 95 | return nil, err |
| 96 | } |
| 97 | return protectedBranch, nil |
| 98 | } |
| 99 | |
| 100 | func runUnProtectBranch(branch, project, out string) error { |
| 101 | branchInfo, err := unProtectBranch(branch, project) |
no test coverage detected