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

Function newTaskReviewListCommand

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

Source from the content-addressed store, hash-verified

1049}
1050
1051func newTaskReviewListCommand(deps commandDeps) *cobra.Command {
1052 var (
1053 taskID string
1054 runID string
1055 statusRaw string
1056 reviewerSessionID string
1057 last int
1058 )
1059 cmd := &cobra.Command{
1060 Use: taskListKey,
1061 Short: "List task-run reviews",
1062 Args: cobra.NoArgs,
1063 RunE: func(cmd *cobra.Command, _ []string) error {
1064 client, err := clientFromDeps(deps)
1065 if err != nil {
1066 return err
1067 }
1068 query, err := parseTaskRunReviewListFilters(
1069 taskID,
1070 runID,
1071 statusRaw,
1072 reviewerSessionID,
1073 last,
1074 )
1075 if err != nil {
1076 return err
1077 }
1078 reviews, err := client.ListTaskRunReviews(cmd.Context(), query)
1079 if err != nil {
1080 return err
1081 }
1082 return writeCommandOutput(cmd, taskRunReviewListBundle(reviews))
1083 },
1084 }
1085 cmd.Flags().StringVar(&taskID, taskTaskKey, "", "Filter by task ID")
1086 cmd.Flags().StringVar(&runID, "run", "", "Filter by task run ID")
1087 cmd.Flags().StringVar(&statusRaw, taskStatusKey, "", "Filter by review status")
1088 cmd.Flags().
1089 StringVar(&reviewerSessionID, "reviewer-session", "", "Filter by reviewer session ID")
1090 cmd.Flags().IntVar(&last, "last", 0, "Show only the most recent N reviews")
1091 return cmd
1092}
1093
1094func newTaskReviewShowCommand(deps commandDeps) *cobra.Command {
1095 return &cobra.Command{

Callers 1

newTaskReviewCommandFunction · 0.85

Calls 5

clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
taskRunReviewListBundleFunction · 0.85
ListTaskRunReviewsMethod · 0.65

Tested by

no test coverage detected