fix: correct gh skill install invocation for frontmatter skills - #42543
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…th --pin for SHA Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
gh skill install invocation for frontmatter skills
|
@copilot refactored generated shell script into a actions/setup/js actions/github-script javascript runtime files that runs |
There was a problem hiding this comment.
Pull request overview
Fixes the compiled activation job’s gh skill install invocation so owner/repo@sha and owner/repo/skill@sha are passed as the <repository> and optional <skill> arguments (rather than a single combined argument that gh mis-parses as a GHES hostname). This unblocks workflow activation failures in the “Install frontmatter skills” step.
Changes:
- Update the activation skill install run-script generation to split
owner/repovsowner/repo/skill/pathand pass--pinseparately. - Update activation step unit test assertions to match the new command shape.
- Recompile workflows to propagate the updated activation script into
.lock.ymloutputs.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/compiler_activation_job_builder.go | Updates the generated activation job run-script to split skill specs into repo/subpath and pass pin separately. |
| pkg/workflow/activation_skills_step_test.go | Adjusts assertions to validate the updated gh skill install command structure. |
| .github/workflows/mattpocock-skills-reviewer.lock.yml | Regenerated compiled workflow reflecting the updated activation install script. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Low
| ctx.steps = append(ctx.steps, " skill_ref=\"${skill_spec##*@}\"\n") | ||
| ctx.steps = append(ctx.steps, " skill_base=\"${skill_spec%@*}\"\n") | ||
| ctx.steps = append(ctx.steps, " install_args=()\n") | ||
| ctx.steps = append(ctx.steps, " if [[ \"${skill_base}\" == */* && \"${skill_base}\" != */*/* ]]; then\n") | ||
| ctx.steps = append(ctx.steps, " install_args+=(--all)\n") | ||
| ctx.steps = append(ctx.steps, " if [[ \"${skill_base}\" == */*/* ]]; then\n") |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Addressed in 09da97d. The PR is narrowed back down to the generator/test change only, and the generated workflow lockfile update was dropped. |
|
@copilot convert the shell script approach to a javascript runtime file in actions/setup/js that reads an environment variable with the skills information and run gh skill at runtime. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated in 107935a and 86966c1. The activation step now loads |
|
🎉 This pull request is included in a new release. Release: |
gh skill installrequiresOWNER/REPOas its first argument and an optionalskill[@version]as the second. The compiled activation step was passing the fullowner/repo/skill@shaas a single argument, whichghmisinterprets as an Enterprise Server hostname, causing step 16 ("Install frontmatter skills") to fail with:Changes
compiler_activation_job_builder.go— rewrite the per-skill install snippet to split the spec:owner/repo@sha→gh skill install "${skill_base}" --all --pin "${skill_ref}" …owner/repo/skill@sha→gh skill install "${skill_repo}" "${skill_subpath}" --pin "${skill_ref}" …activation_skills_step_test.go— update assertions to match the corrected command shape