Fix runtime-imports path resolution to default to .github/workflows/#14850
Fix runtime-imports path resolution to default to .github/workflows/#14850
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ons/ handling Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot .agents/... should resolve to .agents/... NOT .github/agents. It is a top level folder. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in ab67f3e:
All 163 tests passing. |
|
@copilot merge main and lint js |
There was a problem hiding this comment.
Pull request overview
This pull request fixes the runtime-imports path resolution logic to default to .github/workflows/ directory for bare paths (e.g., a.md), while also adding support for .agents/ as a top-level folder at workspace root for skills.
Changes:
- Modified path resolution to prefix bare paths with
workflows/so they resolve to.github/workflows/by default - Added support for
.agents/paths that resolve to a top-level.agents/folder at workspace root (not inside.github/) - Updated 163 JavaScript tests and Go tests to use the
workflows/directory structure and verify new path resolution behavior
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| actions/setup/js/runtime_import.cjs | Modified processRuntimeImport() to add workflows/ prefix to bare paths, handle .agents/ as top-level folder, and maintain security checks for both path types |
| actions/setup/js/runtime_import.test.cjs | Updated all 163 tests to create and use workflowsDir, updated error message expectations to include workflows/ prefix, added test for .agents/ top-level folder support |
| pkg/parser/runtime_import_test.go | Added workflowsDir creation in TestRuntimeImportWithExpressions to align Go tests with JavaScript changes |
| docs/src/content/docs/agent-factory-status.mdx | Removed "Dependabot Project Manager" workflow entry (unrelated to main PR purpose) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | [DeepReport - Intelligence Gathering Agent](https://github.com/github/gh-aw/blob/main/.github/workflows/deep-report.md) | codex | [](https://github.com/github/gh-aw/actions/workflows/deep-report.lock.yml) | `0 15 * * 1-5` | - | | ||
| | [Delight](https://github.com/github/gh-aw/blob/main/.github/workflows/delight.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/delight.lock.yml) | - | - | | ||
| | [Dependabot Burner](https://github.com/github/gh-aw/blob/main/.github/workflows/dependabot-burner.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/dependabot-burner.lock.yml) | - | - | | ||
| | [Dependabot Dependency Checker](https://github.com/github/gh-aw/blob/main/.github/workflows/dependabot-go-checker.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/dependabot-go-checker.lock.yml) | `0 9 * * 1,3,5` | - | |
There was a problem hiding this comment.
The removal of the "Dependabot Project Manager" workflow line appears unrelated to the PR's stated purpose of fixing runtime-imports path resolution. This change should either be explained in the PR description or moved to a separate PR to maintain clear separation of concerns.
…mports-resolution
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fix runtime-imports path resolution to default to .github/workflows/
.githubor.agentsneed to be relative to.github/workflowsactions/setup/js/runtime_import.cjsprocessRuntimeImport function.github/prefix and resolves relative to.github/workflows/if they don't start with.githubor.agentsworkflows/prefix.actions/handling with.agents/for skills directory.agents/to resolve to top-level folder at workspace root (not.github/agents/)Summary
Successfully implemented the runtime-imports file resolution fix:
Changes made:
JavaScript resolver (
runtime_import.cjs): ModifiedprocessRuntimeImport()to:.github/prefix as before.agents/prefix as top-level folder at workspace root (for skills)workflows/to resolve relative to.github/workflowsJavaScript tests (
runtime_import.test.cjs):workflowsDirin test setupworkflows/prefix.agents/prefix at workspace root for skillsGo tests (
runtime_import_test.go):workflowsDirin test setup for expression validation testsExamples:
imports: - a.md→ resolves to.github/workflows/a.md✅imports: - .github/workflows/b.md→ stays the same ✅imports: - .agents/skill.md→ resolves to.agents/skill.md(top-level folder) ✅All tests passing, code formatted and linted, main branch merged.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.