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

Function parseAutomationJobListQuery

internal/cli/automation.go:820–854  ·  view source on GitHub ↗
(
	ctx context.Context,
	client DaemonClient,
	scopeRaw string,
	workspaceRef string,
	sourceRaw string,
	last int,
)

Source from the content-addressed store, hash-verified

818}
819
820func parseAutomationJobListQuery(
821 ctx context.Context,
822 client DaemonClient,
823 scopeRaw string,
824 workspaceRef string,
825 sourceRaw string,
826 last int,
827) (AutomationJobQuery, error) {
828 query := AutomationJobQuery{}
829 if err := validateAutomationLast(last); err != nil {
830 return AutomationJobQuery{}, err
831 }
832 query.Limit = last
833
834 scope, err := parseOptionalAutomationScope(scopeRaw)
835 if err != nil {
836 return AutomationJobQuery{}, err
837 }
838 query.Scope = scope
839
840 if trimmed := strings.TrimSpace(workspaceRef); trimmed != "" {
841 workspaceID, err := resolveAutomationWorkspaceID(ctx, client, trimmed)
842 if err != nil {
843 return AutomationJobQuery{}, err
844 }
845 query.WorkspaceID = workspaceID
846 }
847
848 source, err := parseOptionalAutomationSource(sourceRaw)
849 if err != nil {
850 return AutomationJobQuery{}, err
851 }
852 query.Source = source
853 return query, nil
854}
855
856func parseAutomationTriggerListQuery(
857 ctx context.Context,

Callers 1

newAutomationJobsCommandFunction · 0.85

Tested by

no test coverage detected