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
14 changes: 10 additions & 4 deletions actions/setup/js/firewall_blocked_domains.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ describe("firewall_blocked_domains.cjs", () => {
const result = generateBlockedDomainsSection(["blocked.example.com"], TEMPLATE_PATH);

expect(result).toContain("> [!WARNING]");
expect(result).toContain("> **⚠️ Firewall blocked 1 domain**");
expect(result).toContain("> <details>");
expect(result).toContain("> <summary>Firewall blocked 1 domain</summary>");
expect(result).toContain("> </details>");
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 @@ -328,7 +330,9 @@ describe("firewall_blocked_domains.cjs", () => {
const result = generateBlockedDomainsSection(domains, TEMPLATE_PATH);

expect(result).toContain("> [!WARNING]");
expect(result).toContain("> **⚠️ Firewall blocked 3 domains**");
expect(result).toContain("> <details>");
expect(result).toContain("> <summary>Firewall blocked 3 domains</summary>");
expect(result).toContain("> </details>");
expect(result).toContain("> - `alpha.example.com`");
expect(result).toContain("> - `beta.example.com`");
expect(result).toContain("> - `gamma.example.com`");
Expand Down Expand Up @@ -360,7 +364,8 @@ describe("firewall_blocked_domains.cjs", () => {
const result = generateBlockedDomainsSection(["api.github.com"], TEMPLATE_PATH);

expect(result).toContain("> [!WARNING]");
expect(result).toContain("> **⚠️ Firewall blocked 1 domain**");
expect(result).toContain("> <details>");
expect(result).toContain("> <summary>Firewall blocked 1 domain</summary>");
expect(result).toContain("> - `api.github.com`");
expect(result).toContain("`tools.github.mode: gh-proxy`");
expect(result).toContain("> ```yaml\n> tools:\n> github:\n> mode: gh-proxy\n> ```");
Expand All @@ -373,7 +378,8 @@ describe("firewall_blocked_domains.cjs", () => {
const result = generateBlockedDomainsSection(domains, TEMPLATE_PATH);

expect(result).toContain("> [!WARNING]");
expect(result).toContain("> **⚠️ Firewall blocked 2 domains**");
expect(result).toContain("> <details>");
expect(result).toContain("> <summary>Firewall blocked 2 domains</summary>");
expect(result).toContain("> - `api.github.com`");
expect(result).toContain("> - `other.example.com`");
expect(result).toContain("> ```yaml\n> tools:\n> github:\n> mode: gh-proxy\n> ```");
Expand Down
5 changes: 4 additions & 1 deletion actions/setup/md/firewall_blocked_domains.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
> [!WARNING]
> **⚠️ Firewall blocked {domain_count} {domain_word}**
> <details>
> <summary>Firewall blocked {domain_count} {domain_word}</summary>
>
> The following {domain_word} {verb} blocked by the firewall during workflow execution:
>
Expand All @@ -25,3 +26,5 @@
{yaml_network_list}> ```
>
> See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information.
>
> </details>
Loading