()
| 56 | } |
| 57 | |
| 58 | func 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 | |
| 72 | func runProtectBranch(cmd *cobra.Command, branch string) error { |
| 73 | opts := new(gitlab.ProtectBranchOptions) |
nothing calls this directly
no test coverage detected