(cmd *cobra.Command, hook string)
| 53 | } |
| 54 | |
| 55 | func runEditProjectHook(cmd *cobra.Command, hook string) error { |
| 56 | opts, err := assignAddProjectHookOptions(cmd) |
| 57 | if err != nil { |
| 58 | return err |
| 59 | } |
| 60 | hid, err := strconv.Atoi(hook) |
| 61 | if err != nil { |
| 62 | return err |
| 63 | } |
| 64 | project := getFlagString(cmd, "project") |
| 65 | editedProjectHook, err := editProjectHook(project, hid, (*gitlab.EditProjectHookOptions)(opts)) |
| 66 | if err != nil { |
| 67 | return err |
| 68 | } |
| 69 | printProjectHooksOut(getFlagString(cmd, "out"), editedProjectHook) |
| 70 | return nil |
| 71 | } |
| 72 | |
| 73 | func editProjectHook(project string, hook int, opts *gitlab.EditProjectHookOptions) (*gitlab.ProjectHook, error) { |
| 74 | git, err := newGitlabClient() |
no test coverage detected