MCPcopy Create free account
hub / github.com/compozy/agh / newHooksEventsCommand

Function newHooksEventsCommand

internal/cli/hooks.go:113–136  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

111}
112
113func newHooksEventsCommand(deps commandDeps) *cobra.Command {
114 var query HookEventsQuery
115
116 cmd := &cobra.Command{
117 Use: hooksEventsKey,
118 Short: "List supported hook events",
119 RunE: func(cmd *cobra.Command, _ []string) error {
120 client, err := clientFromDeps(deps)
121 if err != nil {
122 return err
123 }
124
125 events, err := client.HookEvents(cmd.Context(), query)
126 if err != nil {
127 return err
128 }
129 return writeCommandOutput(cmd, hookEventsBundle(events))
130 },
131 }
132
133 cmd.Flags().StringVar(&query.Family, "family", "", "Filter by hook event family")
134 cmd.Flags().BoolVar(&query.SyncOnly, "sync-only", false, "Show only sync-eligible events")
135 return cmd
136}
137
138func newHooksRunsCommand(deps commandDeps) *cobra.Command {
139 var (

Callers 1

newHooksCommandFunction · 0.85

Calls 4

clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
hookEventsBundleFunction · 0.85
HookEventsMethod · 0.65

Tested by

no test coverage detected