-
Notifications
You must be signed in to change notification settings - Fork 203
Closed
Labels
Description
When a workflow is added via gh aw add owner/repo/path/to/workflow.md, the top-level remote import resolves correctly. However, if the imported file itself has relative imports (e.g., shared/tools.md), those are resolved against the local .github/workflows/ directory instead of the remote repo they came from.
Repro:
mkdir test && cd test && git init && mkdir -p .github/workflows
gh aw add elastic/ai-github-actions/gh-agent-workflows/mention-in-pr.md
gh aw compileError:
import file not found
Debug output (DEBUG=parser:remote_fetch):
Resolving include path: file_path=elastic/ai-github-actions/.../rwxp.md@..., base_dir=.../.github/workflows
Detected workflowspec format: ...
Using cached import: ... (SHA: ...) ← top-level remote import succeeds
Resolving include path: file_path=shared/elastic-tools.md, base_dir=.../.github/workflows
Using local file resolution for: shared/elastic-tools.md
Local file not found: .../.github/workflows/shared/elastic-tools.md ← nested import fails
Expected: Nested relative imports from a remote file should resolve relative to the remote repo (e.g., shared/elastic-tools.md inside elastic/ai-github-actions/.../rwxp.md should resolve to elastic/ai-github-actions/gh-agent-workflows/shared/elastic-tools.md@same-ref).
Reactions are currently unavailable