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

Function buildTaskRunReviewRequest

internal/cli/task.go:1176–1203  ·  view source on GitHub ↗
(
	runID string,
	reasonRaw string,
	policyRaw string,
	round int,
	attempt int,
	parentID string,
)

Source from the content-addressed store, hash-verified

1174}
1175
1176func buildTaskRunReviewRequest(
1177 runID string,
1178 reasonRaw string,
1179 policyRaw string,
1180 round int,
1181 attempt int,
1182 parentID string,
1183) (*TaskRunReviewRequest, error) {
1184 if round < 0 {
1185 return nil, errors.New("cli: --round must be zero or positive")
1186 }
1187 if attempt < 0 {
1188 return nil, errors.New("cli: --attempt must be zero or positive")
1189 }
1190 policy, err := parseOptionalReviewPolicy(policyRaw)
1191 if err != nil {
1192 return nil, err
1193 }
1194 request := TaskRunReviewRequest{
1195 RunID: strings.TrimSpace(runID),
1196 ReviewRound: round,
1197 Attempt: attempt,
1198 Policy: policy,
1199 ParentReviewID: strings.TrimSpace(parentID),
1200 Reason: strings.TrimSpace(reasonRaw),
1201 }
1202 return &request, nil
1203}
1204
1205func buildTaskRunReviewVerdictRequest(
1206 reviewID string,

Callers 1

Calls 1

Tested by

no test coverage detected