Skip to content

Store default GitHub lockdown value as a named constant#21303

Merged
pelikhan merged 2 commits intomainfrom
copilot/update-github-lockdown-default
Mar 16, 2026
Merged

Store default GitHub lockdown value as a named constant#21303
pelikhan merged 2 commits intomainfrom
copilot/update-github-lockdown-default

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

The default false value for GitHub MCP server lockdown mode was hardcoded as a literal in getGitHubLockdown() rather than expressed as a named constant.

Changes

  • pkg/constants/constants.go: Added DefaultGitHubLockdown = false constant alongside other DefaultGitHub* constants
  • pkg/workflow/mcp_github_config.go: Updated getGitHubLockdown to return constants.DefaultGitHubLockdown instead of a bare false
// Before
return false // default to lockdown disabled

// After
return constants.DefaultGitHubLockdown
Original prompt

Update the compiler such that the default value of github lockdown to be false. (Store in constant)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update compiler to set default github lockdown to false Store default GitHub lockdown value as a named constant Mar 16, 2026
Copilot AI requested a review from pelikhan March 16, 2026 23:17
@pelikhan pelikhan marked this pull request as ready for review March 16, 2026 23:18
Copilot AI review requested due to automatic review settings March 16, 2026 23:19
@pelikhan pelikhan merged commit 0f3eadd into main Mar 16, 2026
104 checks passed
@pelikhan pelikhan deleted the copilot/update-github-lockdown-default branch March 16, 2026 23:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Extracts the hardcoded false default for GitHub MCP server lockdown mode into a named constant.

Changes:

  • Added DefaultGitHubLockdown constant and updated getGitHubLockdown to use it

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/constants/constants.go Added DefaultGitHubLockdown = false constant
pkg/workflow/mcp_github_config.go Updated getGitHubLockdown to return the new constant

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants