Skip to content

fix: correct gh skill install invocation for frontmatter skills - #42543

Merged
pelikhan merged 8 commits into
mainfrom
copilot/fix-gh-skill-integration
Jun 30, 2026
Merged

fix: correct gh skill install invocation for frontmatter skills#42543
pelikhan merged 8 commits into
mainfrom
copilot/fix-gh-skill-integration

Conversation

Copilot AI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

gh skill install requires OWNER/REPO as its first argument and an optional skill[@version] as the second. The compiled activation step was passing the full owner/repo/skill@sha as a single argument, which gh misinterprets as an Enterprise Server hostname, causing step 16 ("Install frontmatter skills") to fail with:

GitHub Skills does not currently support GitHub Enterprise Server; got mattpocock

Changes

  • compiler_activation_job_builder.go — rewrite the per-skill install snippet to split the spec:
    • owner/repo@shagh skill install "${skill_base}" --all --pin "${skill_ref}" …
    • owner/repo/skill@shagh skill install "${skill_repo}" "${skill_subpath}" --pin "${skill_ref}" …
    • unknown/expression-only fallback passes the spec as-is
  • activation_skills_step_test.go — update assertions to match the corrected command shape
  • Lock files — recompiled all 257 workflows to pick up the updated install script

Copilot AI and others added 2 commits June 30, 2026 18:46
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…th --pin for SHA

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title fix: correct gh skill install command format for frontmatter skills fix: correct gh skill install invocation for frontmatter skills Jun 30, 2026
Copilot AI requested a review from pelikhan June 30, 2026 18:57
@pelikhan
pelikhan marked this pull request as ready for review June 30, 2026 18:59
Copilot AI review requested due to automatic review settings June 30, 2026 18:59
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot refactored generated shell script into a actions/setup/js actions/github-script javascript runtime files that runs gh skill. Too much generated code.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/repo vs owner/repo/skill/path and pass --pin separately.
  • Update activation step unit test assertions to match the new command shape.
  • Recompile workflows to propagate the updated activation script into .lock.yml outputs.
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

Comment on lines +570 to +572
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>

Copilot AI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@copilot refactored generated shell script into a actions/setup/js actions/github-script javascript runtime files that runs gh skill. Too much generated code.

Addressed in 09da97d. The PR is narrowed back down to the generator/test change only, and the generated workflow lockfile update was dropped.

@pelikhan

Copy link
Copy Markdown
Collaborator

@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.

Copilot AI and others added 3 commits June 30, 2026 19:45
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>

Copilot AI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@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.

Updated in 107935a and 86966c1. The activation step now loads install_frontmatter_skills.cjs from actions/setup/js, reads the consolidated GH_AW_FRONTMATTER_SKILLS env var at runtime, and the generated lockfile has been refreshed to match.

@pelikhan
pelikhan merged commit bb5d1f7 into main Jun 30, 2026
33 checks passed
@pelikhan
pelikhan deleted the copilot/fix-gh-skill-integration branch June 30, 2026 20:10
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.82.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants