Skip to content

fix(copilot): add dangerously_skip_permissions alias for --allow-all#338

Merged
pocky merged 1 commit into
mainfrom
fix/copilot-dangerously-skip-permissions-alias
May 11, 2026
Merged

fix(copilot): add dangerously_skip_permissions alias for --allow-all#338
pocky merged 1 commit into
mainfrom
fix/copilot-dangerously-skip-permissions-alias

Conversation

@pocky
Copy link
Copy Markdown
Contributor

@pocky pocky commented May 11, 2026

Summary

  • Add dangerously_skip_permissions as a cross-provider alias for allow_all in the Copilot provider, mapping it to the --allow-all CLI flag
  • Ensures workflows using the Claude-style dangerously_skip_permissions option work without modification when targeting Copilot, improving provider portability
  • When both allow_all and dangerously_skip_permissions are set, allow_all takes precedence and --allow-all appears exactly once in the CLI args

Changes

Infrastructure

  • internal/infrastructure/agents/copilot_provider.go: Add else if branch in appendCopilotOptions to handle dangerously_skip_permissions as an alias for --allow-all

Tests

  • internal/infrastructure/agents/copilot_provider_unit_test.go: Add table-driven test case for dangerously_skip_permissions alias, plus two dedicated tests — one verifying allow_all takes precedence (deduplication), one verifying false value omits the flag

Test plan

  • make test-unit passes with no failures
  • Run a Copilot workflow with dangerously_skip_permissions: true and confirm --allow-all is passed to the CLI
  • Run with both allow_all: true and dangerously_skip_permissions: true and confirm --allow-all appears exactly once
  • Run with dangerously_skip_permissions: false and confirm --allow-all is absent from CLI args

Generated with awf commit workflow

- `internal/infrastructure/agents/copilot_provider.go`: Map `dangerously_skip_permissions` option to `--allow-all` flag for cross-provider compatibility
- `internal/infrastructure/agents/copilot_provider_unit_test.go`: Add tests for alias behavior, precedence when both options set, and false value omits flag
@pocky pocky marked this pull request as ready for review May 11, 2026 20:50
@pocky pocky merged commit 4408e0f into main May 11, 2026
5 checks passed
@pocky pocky deleted the fix/copilot-dangerously-skip-permissions-alias branch May 11, 2026 20:50
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.

1 participant