MCPcopy Index your code
hub / github.com/devopsctl/gitlabctl / init

Function init

cmd/edit_branch.go:58–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56}
57
58func init() {
59 editCmd.AddCommand(editBranchCmd)
60 addProjectFlag(editBranchCmd)
61 verifyMarkFlagRequired(editBranchCmd, "project")
62 editBranchCmd.Flags().Bool("unprotect", false,
63 "Remove protection of a branch")
64 editBranchCmd.Flags().Bool("protect", false,
65 "Protect a branch")
66 editBranchCmd.Flags().Bool("dev-can-push", false,
67 "Used with '--protect'. Flag if developers can push to the branch")
68 editBranchCmd.Flags().Bool("dev-can-merge", false,
69 "Used with '--protect'. Flag if developers can merge to the branch")
70}
71
72func runProtectBranch(cmd *cobra.Command, branch string) error {
73 opts := new(gitlab.ProtectBranchOptions)

Callers

nothing calls this directly

Calls 2

addProjectFlagFunction · 0.85
verifyMarkFlagRequiredFunction · 0.85

Tested by

no test coverage detected