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

Function newTaskRejectCommand

internal/cli/task.go:1278–1296  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

1276}
1277
1278func newTaskRejectCommand(deps commandDeps) *cobra.Command {
1279 cmd := &cobra.Command{
1280 Use: "reject <id>",
1281 Short: "Reject a pending approval task",
1282 Args: exactOneNonBlankArg(),
1283 RunE: func(cmd *cobra.Command, args []string) error {
1284 client, err := clientFromDeps(deps)
1285 if err != nil {
1286 return err
1287 }
1288 rejected, err := client.RejectTask(cmd.Context(), args[0])
1289 if err != nil {
1290 return err
1291 }
1292 return writeCommandOutput(cmd, taskBundle(&rejected))
1293 },
1294 }
1295 return cmd
1296}
1297
1298func newTaskExecutionCommand(
1299 deps commandDeps,

Callers 1

newTaskCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
taskBundleFunction · 0.85
RejectTaskMethod · 0.65

Tested by

no test coverage detected