Resolve nested imports and symlinks#15987
Merged
pelikhan merged 9 commits intogithub:mainfrom Feb 15, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes remote workflow import edge-cases in the parser by (1) ensuring nested relative imports inside a remotely-imported workflow resolve against the remote repository’s .github/workflows/ directory, and (2) adding a fallback that resolves symlink path components when the GitHub Contents API returns 404.
Changes:
- Track remote repo context (owner/repo/ref) for workflowspec imports and propagate it to nested imports so relative paths become remote workflowspecs under
.github/workflows/. - Add a 404 fallback in remote GitHub fetches to resolve symlinks in intermediate path components (bounded recursion).
- Add unit tests around remote-origin parsing/propagation helpers and symlink path construction logic.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
pkg/parser/remote_fetch.go |
Adds 404 retry path that resolves remote symlink components before re-fetching via Contents API. |
pkg/parser/import_processor.go |
Introduces remote-origin tracking on import queue items and rewrites nested relative imports from remote parents into remote .github/workflows/* workflowspecs. |
pkg/parser/import_remote_nested_test.go |
Adds tests for remote-origin parsing/struct plumbing and some symlink path math checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Add logging, specially around path resolutions. LGTM |
Contributor
Author
|
Done |
pelikhan
reviewed
Feb 15, 2026
Contributor
pelikhan
left a comment
There was a problem hiding this comment.
Can an have integration tests that try the symlink route?
Contributor
|
Looks great overall! |
Contributor
Author
|
should be good |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.github/workflows/directory instead of the local one#15982