Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions actions/setup/js/install_frontmatter_skills.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,18 @@ function appendSkillInstallFailure(skillSpec, errorMessage) {
* @returns {Promise<void>}
*/
async function writeSkillSummary(skillDir, skills, installedSkillCount, failures) {
core.summary
.addRaw("### Frontmatter skills installed\n\n")
.addRaw(`- Engine skill directory: \`${skillDir}\`\n`)
.addRaw(`- Requested references: \`${JSON.stringify(skills)}\`\n`)
.addRaw(`- Installed SKILL.md files: ${installedSkillCount}\n`);
let body = "";
body += `- Engine skill directory: \`${skillDir}\`\n`;
body += `- Requested references: \`${JSON.stringify(skills)}\`\n`;
body += `- Installed SKILL.md files: ${installedSkillCount}\n`;
if (failures.length > 0) {
core.summary.addRaw("\n#### ⚠️ Skill install failures\n\n");
body += "\n#### Skill install failures\n\n";
for (const f of failures) {
core.summary.addRaw(`- \`${f.skill}\`: ${f.error}\n`);
body += `- \`${f.skill}\`: ${f.error}\n`;
}
}
const openAttr = failures.length > 0 ? " open" : "";
core.summary.addRaw(`### Frontmatter skills installed\n\n<details${openAttr}>\n<summary>Skill install details</summary>\n\n${body}\n</details>\n\n`);
await core.summary.write();
}

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.

Skill install failures are now hidden inside the collapsed <details> block by default, and the ⚠️ warning emoji was also removed. If skills fail to install, a user scanning the step summary won't notice without expanding the block.

Consider either:

  • Keeping failures visible outside the <details> block (only collapse the success detail), or
  • Reopening the <details> block by default when failures exist: <details open>

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the latest commit — writeSkillSummary now uses <details open> when failures.length > 0, so failures are visible by default without needing to expand the block. A test assertion for this behavior was added to the failure test case.

Expand Down
2 changes: 2 additions & 0 deletions actions/setup/js/install_frontmatter_skills.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ describe("install_frontmatter_skills", () => {
expect(global.exec.exec).toHaveBeenNthCalledWith(2, "gh", ["skill", "install", "githubnext/skills", "review/security", "--pin", "def456", "--agent", "claude-code", "--dir", "/tmp/gh-aw/.claude/skills", "--force"]);
expect(global.exec.exec).toHaveBeenNthCalledWith(3, "gh", ["skill", "install", "${{ inputs.skill_ref }}", "--agent", "claude-code", "--dir", "/tmp/gh-aw/.claude/skills", "--force"]);
expect(global.core.summary.addRaw).toHaveBeenCalledWith(expect.stringContaining("### Frontmatter skills installed"));
expect(global.core.summary.addRaw).toHaveBeenCalledWith(expect.stringContaining("<details>"));
expect(global.core.summary.addRaw).toHaveBeenCalledWith(expect.stringContaining('["githubnext/skills@abc123","githubnext/skills/review/security@def456","${{ inputs.skill_ref }}"]'));
});

Expand All @@ -145,5 +146,6 @@ describe("install_frontmatter_skills", () => {
const failures = JSON.parse(fs.readFileSync("/tmp/gh-aw/skill_install_failures.json", "utf8"));
expect(failures).toEqual([{ skill: "bad/repo@abc123", error: "exit code 1 HTTP 404" }]);
expect(global.core.warning).toHaveBeenCalledWith(expect.stringContaining("Failed to install skill 'bad/repo@abc123'"));
expect(global.core.summary.addRaw).toHaveBeenCalledWith(expect.stringContaining("<details open>"));
});
});
Loading