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
2 changes: 1 addition & 1 deletion actions/setup/js/firewall_blocked_domains.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function generateBlockedDomainsSection(blockedDomains) {

let section = "\n\n> [!WARNING]\n";
section += `> <details>\n`;
section += `> <summary>⚠️ Firewall blocked ${domainCount} ${domainWord}</summary>\n`;
section += `> <summary>**⚠️ Firewall blocked ${domainCount} ${domainWord}**</summary>\n`;
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

<summary> is emitted as HTML, and Markdown emphasis (**...**) typically isn’t parsed inside HTML tags in GitHub-flavored Markdown. This can cause the UI to show the literal ** instead of bold text. For consistent rendering (and to align with existing usage like actions/setup/js/validate_secrets.cjs:600), use <summary><strong>…</strong></summary> (or <b>) and update the tests to match.

Suggested change
section += `> <summary>**⚠️ Firewall blocked ${domainCount} ${domainWord}**</summary>\n`;
section += `> <summary><strong>⚠️ Firewall blocked ${domainCount} ${domainWord}</strong></summary>\n`;

Copilot uses AI. Check for mistakes.
section += `>\n`;
section += `> The following ${domainWord} ${domainCount === 1 ? "was" : "were"} blocked by the firewall during workflow execution:\n`;
section += `>\n`;
Expand Down
4 changes: 2 additions & 2 deletions actions/setup/js/firewall_blocked_domains.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ describe("firewall_blocked_domains.cjs", () => {
expect(result).toContain("> [!WARNING]");
expect(result).toContain("> <details>");
expect(result).toContain("> </details>");
expect(result).toContain("> <summary>⚠️ Firewall blocked 1 domain</summary>");
expect(result).toContain("> <summary>**⚠️ Firewall blocked 1 domain**</summary>");
expect(result).toContain("> - `blocked.example.com`");
expect(result).toContain("> The following domain was blocked by the firewall during workflow execution:");
expect(result).toContain('> ```yaml\n> network:\n> allowed:\n> - defaults\n> - "blocked.example.com"\n> ```');
Expand All @@ -325,7 +325,7 @@ describe("firewall_blocked_domains.cjs", () => {
expect(result).toContain("> [!WARNING]");
expect(result).toContain("> <details>");
expect(result).toContain("> </details>");
expect(result).toContain("> <summary>⚠️ Firewall blocked 3 domains</summary>");
expect(result).toContain("> <summary>**⚠️ Firewall blocked 3 domains**</summary>");
expect(result).toContain("> - `alpha.example.com`");
expect(result).toContain("> - `beta.example.com`");
expect(result).toContain("> - `gamma.example.com`");
Expand Down
4 changes: 2 additions & 2 deletions actions/setup/js/gateway_difc_filtered.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ function generateDifcFilteredSection(filteredEvents) {

let section = "\n\n> [!NOTE]\n";
section += `> <details>\n`;
section += `> <summary>🔒 Integrity filter blocked ${count} ${itemWord}</summary>\n`;
section += `> <summary>**🔒 Integrity filter blocked ${count} ${itemWord}**</summary>\n`;
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

<summary> is an HTML tag, and GitHub Markdown generally does not parse **...** emphasis inside HTML elements, so this is likely to render the literal ** characters instead of bold text. To get reliable bold (and match existing conventions like actions/setup/js/validate_secrets.cjs:600), wrap the summary text in <strong> (or <b>) rather than using Markdown emphasis, and update the related test assertions accordingly.

Suggested change
section += `> <summary>**🔒 Integrity filter blocked ${count} ${itemWord}**</summary>\n`;
section += `> <summary><strong>🔒 Integrity filter blocked ${count} ${itemWord}</strong></summary>\n`;

Copilot uses AI. Check for mistakes.
section += `>\n`;
section += `> The following ${itemWord} were blocked because they don't meet the GitHub [\`min-integrity\`](https://github.github.com/gh-aw/reference/integrity/) level.\n`;
section += `> The following ${itemWord} were blocked because they don't meet the GitHub integrity level.\n`;
section += `>\n`;

const maxItems = 16;
Expand Down
11 changes: 5 additions & 6 deletions actions/setup/js/gateway_difc_filtered.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ describe("gateway_difc_filtered.cjs", () => {
expect(result).toContain("> [!NOTE]");
expect(result).toContain("> <details>");
expect(result).toContain("> </details>");
expect(result).toContain("> <summary>🔒 Integrity filter blocked 1 item</summary>");
expect(result).toContain("> <summary>**🔒 Integrity filter blocked 1 item**</summary>");
expect(result).toContain("[#42](https://github.com/org/repo/issues/42)");
expect(result).toContain("`list_issues`");
expect(result).toContain("Integrity check failed");
Expand All @@ -202,7 +202,7 @@ describe("gateway_difc_filtered.cjs", () => {
const result = generateDifcFilteredSection(events);

expect(result).toContain("> [!NOTE]");
expect(result).toContain("> <summary>🔒 Integrity filter blocked 2 items</summary>");
expect(result).toContain("> <summary>**🔒 Integrity filter blocked 2 items**</summary>");
expect(result).toContain("[#42](https://github.com/org/repo/issues/42)");
expect(result).toContain("[#99](https://github.com/org/repo/issues/99)");
});
Expand Down Expand Up @@ -260,7 +260,7 @@ describe("gateway_difc_filtered.cjs", () => {
const result = generateDifcFilteredSection(events);

expect(result).toContain("blocked because they don't meet");
expect(result).toContain("min-integrity");
expect(result).toContain("GitHub integrity level");
});

it("should include frontmatter yaml sample for adjusting min-integrity", () => {
Expand All @@ -269,7 +269,6 @@ describe("gateway_difc_filtered.cjs", () => {

expect(result).toContain("```yaml");
expect(result).toContain("min-integrity:");
expect(result).toContain("Integrity Filtering");
});

it("should render item lines without parentheses around tool and reason", () => {
Expand Down Expand Up @@ -319,7 +318,7 @@ describe("gateway_difc_filtered.cjs", () => {

const result = generateDifcFilteredSection(events);

expect(result).toContain("> <summary>🔒 Integrity filter blocked 2 items</summary>");
expect(result).toContain("> <summary>**🔒 Integrity filter blocked 2 items**</summary>");
expect(result).toContain("[#42](https://github.com/org/repo/issues/42)");
expect(result).toContain("[#99](https://github.com/org/repo/issues/99)");
});
Expand Down Expand Up @@ -364,7 +363,7 @@ describe("gateway_difc_filtered.cjs", () => {
const result = generateDifcFilteredSection(events);

// Summary still shows the total count
expect(result).toContain("> <summary>🔒 Integrity filter blocked 20 items</summary>");
expect(result).toContain("> <summary>**🔒 Integrity filter blocked 20 items**</summary>");
// First 16 items rendered
expect(result).toContain("[#1](https://github.com/org/repo/issues/1)");
expect(result).toContain("[#16](https://github.com/org/repo/issues/16)");
Expand Down
1 change: 0 additions & 1 deletion actions/setup/md/integrity_filter_remediation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ tools:
min-integrity: approved # merged | approved | unapproved | none
```

See [Integrity Filtering](https://github.github.com/gh-aw/reference/integrity/) for more information.
Loading