Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The guard misses alternate-repository checkouts and checkout context inherited by migrated composite actions.
1 open finding
What changed in this PR
Adds safeguards to prevent unsafe ./… to $/… migrations after custom-ref checkouts.
Changes:
- Detects preceding custom-ref checkout steps.
- Preserves all-or-nothing migration behavior.
- Adds unit, command, alias, and documentation coverage.
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if err := f.validateCheckoutRefsForMigration(replacements); err != nil { | ||
| return append([]byte(nil), f.Content...), 0, err |
There was a problem hiding this comment.
This would also require checking if any workflow hits that composite action with a custom checkout step, not just the one being migrated.
|
For |
|
@jessehouwing |



Problem
Migrating
./local-actionto$/local-actionchanges which code runs when a precedingactions/checkoutstep selects a different repository or ref. The local path reads the checked-out workspace, while$/resolves at the running commit.This also affects nested references: a workflow can check out a different repository or ref and call an existing
$/outerwhose definition still uses./inner. A file-local check misses that migration.Fix
Reject the migration before writing any files when a preceding checkout has a non-empty
refother than${{ github.sha }}, or a non-emptyrepositoryother than${{ github.repository }}. Literal repository names and other repository expressions are conservatively rejected because their runtime repository identity cannot be established. The error identifies the action being migrated and the checkout input, value, file, and line, and points to--no-migrate-local-actionsto preserve local references../…and$/…composite calls and back to subsequent caller steps. Keep jobs independent.The guard covers explicit checkout steps in workflows and in-repo composite actions; it does not analyze workspace changes through scripts or remote actions. Workflows retaining
./…references still cannot be onboarded to the lockfile.Fixes #112.
Tests
make test(including the race-enabled Go suite),make build fmt-check vet, and all 34make test-stubscenarios passed.repository override → $/outer → ./innerexited 2, reported the checkout source, and left every file unchanged in full, JSON, and scoped runs.