Skip to content

Commit b9c1398

Browse files
Copilotpelikhan
andcommitted
Rename detect-repo-visibility to determine-automatic-lockdown and require custom token
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent 43c5bbe commit b9c1398

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/workflow/mcp_renderer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (r *MCPConfigRendererUnified) RenderGitHubMCP(yaml *strings.Builder, github
4545

4646
// Get lockdown value - use detected value if lockdown wasn't explicitly set
4747
lockdown := getGitHubLockdown(githubTool)
48-
48+
4949
// Check if automatic lockdown determination step will be generated
5050
// This requires: lockdown not explicitly set AND custom token configured
5151
customGitHubToken := getGitHubToken(githubTool)
@@ -55,7 +55,7 @@ func (r *MCPConfigRendererUnified) RenderGitHubMCP(yaml *strings.Builder, github
5555
}
5656
hasCustomToken := customGitHubToken != "" || toplevelToken != ""
5757
shouldUseStepOutput := !hasGitHubLockdownExplicitlySet(githubTool) && hasCustomToken
58-
58+
5959
if shouldUseStepOutput {
6060
// Use the detected lockdown value from the step output
6161
// This will be evaluated at runtime based on repository visibility

pkg/workflow/mcp_servers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,10 +793,10 @@ func (c *Compiler) generateGitHubMCPLockdownDetectionStep(yaml *strings.Builder,
793793
// The step only applies when GH_AW_GITHUB_MCP_SERVER_TOKEN is explicitly configured
794794
customGitHubToken := getGitHubToken(githubTool)
795795
toplevelToken := data.GitHubToken
796-
796+
797797
// Determine if a custom token is being used (not the default fallback)
798798
hasCustomToken := customGitHubToken != "" || toplevelToken != ""
799-
799+
800800
if !hasCustomToken {
801801
mcpServersLog.Print("No custom GitHub MCP server token defined, skipping automatic lockdown determination")
802802
return

0 commit comments

Comments
 (0)