Move push_repo_memory script from inline to require action mode #7498
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.
The
push_repo_memorystep was inlining ~200 lines of JavaScript in every compiled workflow lock file. This change moves it to use the require pattern like other scripts in the codebase.Changes
pkg/workflow/repo_memory.go: ModifiedbuildPushRepoMemoryJob()to userequire('/tmp/gh-aw/actions/push_repo_memory.cjs')when setup action is available, falling back to inline script otherwisepkg/workflow/repo_memory_integration_test.go: Updated test to verify require statement presence instead of checking for inline validation messagesBefore/After
Before (~200 lines per workflow):
After (7 lines):
The JavaScript file at
actions/setup/js/push_repo_memory.cjswas already present and unchanged.Net impact: -1,899 lines across all lock files
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.