compiler: auto-derive and warn on missing path: for cross-repo checkout entries#42257
compiler: auto-derive and warn on missing path: for cross-repo checkout entries#42257Copilot wants to merge 2 commits into
path: for cross-repo checkout entries#42257Conversation
…issing path Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
path: for cross-repo checkout entries
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Hey One thing to keep in mind before this moves out of WIP:
If you'd like a hand getting this across the finish line, here's a ready-to-use prompt:
|
🔍 PR Triage — §28395315609
Score breakdown: impact 25 + urgency 10 + quality 12
|
When a
checkout:block has a cross-repo entry without an explicitpath:, the compiler was emittingGH_AW_CHECKOUT_PATH_N: "", causing safe-outputs handlers (e.g.push_to_pull_request_branch) to fail at runtime with "Repository not found in workspace."Changes
pkg/workflow/checkout_path_validation.go— newvalidateCrossRepoCheckoutPathsvalidator that:path:from the repo-name segment ofowner/repo(e.g.githubnext/gh-aw-side-repo→gh-aw-side-repo) and mutates theCheckoutConfigbefore YAML generation, ensuring both the emittedactions/checkoutstep andGH_AW_CHECKOUT_PATH_Nin the manifest are non-emptypath:to silence it${{…}}expressions — cannot be resolved at compile time; common patterns likerepository: ${{ github.repository }}(trustedpull_request_targetcheckout) must not warnpkg/workflow/compiler_validators.go— wiresvalidateCrossRepoCheckoutPathsintovalidateCoreToolConfiguration, before checkout step generation