From b4c386b692f72d8330991573de331c29d56bb5bd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:39:50 +0000 Subject: [PATCH 1/2] Initial plan From 9db251f37d3888377bffffe4e4205cdca4a57b9e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:48:28 +0000 Subject: [PATCH 2/2] Fix MCP config tests for --validate-actor flag and GITHUB_REPOSITORY env var Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/mcp_config_refactor_test.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkg/workflow/mcp_config_refactor_test.go b/pkg/workflow/mcp_config_refactor_test.go index 46134325151..8e9aa4ce6a6 100644 --- a/pkg/workflow/mcp_config_refactor_test.go +++ b/pkg/workflow/mcp_config_refactor_test.go @@ -133,7 +133,7 @@ func TestRenderAgenticWorkflowsMCPConfigWithOptions(t *testing.T) { `"type": "stdio"`, `"container": "alpine:latest"`, `"entrypoint": "/opt/gh-aw/gh-aw"`, - `"entrypointArgs": ["mcp-server", "--actor", "\${GITHUB_ACTOR}"]`, + `"entrypointArgs": ["mcp-server", "--validate-actor"]`, `"/opt/gh-aw:/opt/gh-aw:ro"`, // gh-aw binary mount (read-only) `"/usr/bin/gh:/usr/bin/gh:ro"`, // gh CLI binary mount (read-only) `"\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw"`, // workspace mount (read-write) @@ -141,7 +141,8 @@ func TestRenderAgenticWorkflowsMCPConfigWithOptions(t *testing.T) { `"args": ["--network", "host", "-w", "\${GITHUB_WORKSPACE}"]`, // Network access + working directory `"DEBUG": "*"`, `"GITHUB_TOKEN": "\${GITHUB_TOKEN}"`, - `"GITHUB_ACTOR": "\${GITHUB_ACTOR}"`, // Actor for role-based access control + `"GITHUB_ACTOR": "\${GITHUB_ACTOR}"`, // Actor for role-based access control + `"GITHUB_REPOSITORY": "\${GITHUB_REPOSITORY}"`, // Repository context ` },`, }, unexpectedContent: []string{ @@ -279,12 +280,12 @@ func TestRenderAgenticWorkflowsMCPConfigTOML(t *testing.T) { expectedContainer: `container = "alpine:latest"`, shouldHaveEntrypoint: true, expectedMounts: []string{ - `entrypoint = "/opt/gh-aw/gh-aw"`, // Entrypoint needed in release mode - `entrypointArgs = ["mcp-server", "--actor", "${GITHUB_ACTOR}"]`, // EntrypointArgs needed in release mode with actor flag - `"/opt/gh-aw:/opt/gh-aw:ro"`, // gh-aw binary mount - `"/usr/bin/gh:/usr/bin/gh:ro"`, // gh CLI binary mount - `"\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw"`, // workspace mount - `"/tmp/gh-aw:/tmp/gh-aw:rw"`, // temp directory mount + `entrypoint = "/opt/gh-aw/gh-aw"`, // Entrypoint needed in release mode + `entrypointArgs = ["mcp-server", "--validate-actor"]`, // EntrypointArgs needed in release mode with validate-actor flag + `"/opt/gh-aw:/opt/gh-aw:ro"`, // gh-aw binary mount + `"/usr/bin/gh:/usr/bin/gh:ro"`, // gh CLI binary mount + `"\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw"`, // workspace mount + `"/tmp/gh-aw:/tmp/gh-aw:rw"`, // temp directory mount }, unexpectedContent: []string{ `--cmd`, @@ -304,7 +305,7 @@ func TestRenderAgenticWorkflowsMCPConfigTOML(t *testing.T) { `[mcp_servers.agenticworkflows]`, tt.expectedContainer, `args = ["--network", "host", "-w", "${GITHUB_WORKSPACE}"]`, // Network access + working directory - `env_vars = ["DEBUG", "GITHUB_TOKEN", "GITHUB_ACTOR"]`, + `env_vars = ["DEBUG", "GITHUB_TOKEN", "GITHUB_ACTOR", "GITHUB_REPOSITORY"]`, } expectedContent = append(expectedContent, tt.expectedMounts...)