Skip to content

docs: document all three import path resolution modes#24505

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/update-imports-documentation
Closed

docs: document all three import path resolution modes#24505
Copilot wants to merge 2 commits intomainfrom
copilot/update-imports-documentation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

Users didn't know .github/agents/ imports were failing, that the .github/-prefix syntax existed after the fix, or that cross-repo imports were already supported. The imports reference and JSON schema only described the owner/repo/path@ref cross-repo form.

Changes

docs/src/content/docs/reference/imports.md

  • Replaced the one-liner "Path Formats" section with a full reference covering all three resolution modes:
Mode Syntax Resolved against
Relative (default) shared/file.md .github/workflows/
Repo-root-relative .github/agents/file.md or /path/file.md Repository root
Cross-repo owner/repo/path@ref Remote GitHub repository
  • Added per-mode subsections with examples, a worked example showing all three in one frontmatter block, a backward-compatibility note, and security constraints (.github/ boundary enforcement).

pkg/parser/schemas/main_workflow_schema.json

  • Updated imports top-level description and all string/path/uses item descriptions to enumerate all three path forms — previously only the cross-repo owner/repo/path@ref form was mentioned.

Example: all three forms in one workflow

imports:
  # 1. Relative — resolved from .github/workflows/
  - shared/common-tools.md
  # 2. Repo-root-relative — resolved from repository root
  - .github/agents/code-reviewer.md
  # 3. Cross-repo — pinned to a release tag
  - acme-org/shared-workflows/mcp/tavily.md@v1.0.0

…tive, cross-repo)

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/289105c7-d9c0-4813-9f2c-bdc636fce152

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update gh-aw documentation for import path resolution docs: document all three import path resolution modes Apr 4, 2026
Copilot AI requested a review from pelikhan April 4, 2026 14:58
@pelikhan pelikhan closed this Apr 4, 2026
@github-actions github-actions Bot deleted the copilot/update-imports-documentation branch April 16, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Document import path resolution: repo-root-relative, .github/agents/, and cross-repo imports

2 participants