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

Function resolveAutomationWorkspaceID

internal/cli/automation.go:960–978  ·  view source on GitHub ↗
(
	ctx context.Context,
	client DaemonClient,
	ref string,
)

Source from the content-addressed store, hash-verified

958}
959
960func resolveAutomationWorkspaceID(
961 ctx context.Context,
962 client DaemonClient,
963 ref string,
964) (string, error) {
965 trimmed := strings.TrimSpace(ref)
966 if trimmed == "" {
967 return "", nil
968 }
969 detail, err := client.GetWorkspace(ctx, trimmed)
970 if err != nil {
971 return "", fmt.Errorf("cli: resolve workspace %q: %w", trimmed, err)
972 }
973 id := strings.TrimSpace(detail.Workspace.ID)
974 if id == "" {
975 return "", fmt.Errorf("cli: resolve workspace %q: missing workspace id", trimmed)
976 }
977 return id, nil
978}
979
980func parseRequiredAutomationScope(raw string) (automationpkg.Scope, error) {
981 if strings.TrimSpace(raw) == "" {

Calls 1

GetWorkspaceMethod · 0.65

Tested by

no test coverage detected