Conversation
Introduce configurable permission_approve modes and switch the default to a safer "deny-all". CopilotManager::ensurePermissionHandler was refactored to inject handlers for 'deny-all', 'approve-safety', 'approve-all' (and map legacy true to approveAll) or omit injection when false. Updated config default in config/copilot.php, translated and expanded Japanese docs to document the new options and cautions, and added comprehensive tests for ensurePermissionHandler behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates how permission requests are handled in the Copilot integration, making the default behavior safer and providing more granular configuration options. The changes clarify documentation, update configuration defaults, and refactor handler injection logic to support multiple modes. Comprehensive tests are added to verify each mode.
Configuration and handler logic updates:
config/copilot.phpto change the default value ofpermission_approvefromtrue(auto-approve) to"deny-all"(auto-deny), and clarified the configuration options and documentation comments to support four modes:"deny-all","approve-safety","approve-all", andfalse.CopilotManager::ensurePermissionHandlerto inject the correct handler based on the newpermission_approvesetting, supporting all four modes and ensuring legacy behavior is preserved fortrue.Documentation updates:
docs/jp/permission-request.mdto reflect the new default ("deny-all"), explain the available configuration values, and add safety warnings for potentially dangerous settings.Testing improvements:
CopilotManagerTest.phpto verify handler injection for each configuration mode, including legacy and custom handler scenarios.