(ctx context.Context, raw json.RawMessage)
| 1558 | } |
| 1559 | |
| 1560 | func (h *HostAPIHandler) handleAutomationJobsRuns(ctx context.Context, raw json.RawMessage) (any, error) { |
| 1561 | automation, err := h.automationManager() |
| 1562 | if err != nil { |
| 1563 | return nil, err |
| 1564 | } |
| 1565 | |
| 1566 | var params hostAPIAutomationJobRunsParams |
| 1567 | if err := decodeHostAPIParams(raw, ¶ms); err != nil { |
| 1568 | return nil, err |
| 1569 | } |
| 1570 | if strings.TrimSpace(params.ID) == "" { |
| 1571 | return nil, invalidParamsRPCError(errors.New("id is required")) |
| 1572 | } |
| 1573 | |
| 1574 | job, err := automation.GetJob(ctx, params.ID) |
| 1575 | if err != nil { |
| 1576 | return nil, err |
| 1577 | } |
| 1578 | return automation.ListRuns(ctx, automationpkg.RunQuery{ |
| 1579 | JobID: job.ID, |
| 1580 | Status: params.Status, |
| 1581 | Limit: params.Limit, |
| 1582 | }) |
| 1583 | } |
| 1584 | |
| 1585 | func (h *HostAPIHandler) handleAutomationTriggers(ctx context.Context, raw json.RawMessage) (any, error) { |
| 1586 | automation, err := h.automationManager() |
nothing calls this directly
no test coverage detected