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

Method handleAutomationJobsRuns

internal/extension/host_api.go:1560–1583  ·  view source on GitHub ↗
(ctx context.Context, raw json.RawMessage)

Source from the content-addressed store, hash-verified

1558}
1559
1560func (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, &params); 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
1585func (h *HostAPIHandler) handleAutomationTriggers(ctx context.Context, raw json.RawMessage) (any, error) {
1586 automation, err := h.automationManager()

Callers

nothing calls this directly

Calls 5

automationManagerMethod · 0.95
decodeHostAPIParamsFunction · 0.85
invalidParamsRPCErrorFunction · 0.85
GetJobMethod · 0.65
ListRunsMethod · 0.65

Tested by

no test coverage detected