( ctx context.Context, scope taskpkg.Scope, workspaceRef string, path string, )
| 2479 | } |
| 2480 | |
| 2481 | func (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 | |
| 2497 | func validateTaskChannel(path string, channel string) error { |
| 2498 | trimmed := strings.TrimSpace(channel) |
no test coverage detected