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

Method resolveTaskWorkspaceBinding

internal/api/core/tasks.go:2481–2495  ·  view source on GitHub ↗
(
	ctx context.Context,
	scope taskpkg.Scope,
	workspaceRef string,
	path string,
)

Source from the content-addressed store, hash-verified

2479}
2480
2481func (h *BaseHandlers) resolveTaskWorkspaceBinding(
2482 ctx context.Context,
2483 scope taskpkg.Scope,
2484 workspaceRef string,
2485 path string,
2486) (string, error) {
2487 trimmed := strings.TrimSpace(workspaceRef)
2488 if err := taskpkg.ValidateScopeBinding(scope, trimmed, path, "workspace"); err != nil {
2489 return "", err
2490 }
2491 if scope.Normalize() != taskpkg.ScopeWorkspace {
2492 return "", nil
2493 }
2494 return h.lookupWorkspaceID(ctx, trimmed)
2495}
2496
2497func validateTaskChannel(path string, channel string) error {
2498 trimmed := strings.TrimSpace(channel)

Callers 2

Calls 2

lookupWorkspaceIDMethod · 0.95
NormalizeMethod · 0.45

Tested by

no test coverage detected