-
Notifications
You must be signed in to change notification settings - Fork 147
Add interactive engine selection and secret configuration to init command #11064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… configuration Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
|
@copilot ask confirmation before configuring secrets, gracefully handle the case where gh does not have enough permissions to set the secret. |
…sion error handling - Add interactive confirmation prompt before setting repository secrets - Gracefully handle permission errors (403, Forbidden) with clear messaging - Display specific error messages for permission issues vs other failures - Skip setting secrets if user declines confirmation Co-authored-by: pelikhan <[email protected]>
Added in commit f254409:
The secret configuration continues with remaining secrets even if one fails due to permissions. |
pkg/cli/init.go
Outdated
| label string | ||
| description string | ||
| }{ | ||
| {"copilot", "GitHub Copilot", "GitHub Copilot CLI with agent support"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot use types and constants defined in constants.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in commit fd1ffd0 to use constants.CopilotEngine, constants.ClaudeEngine, and constants.CodexEngine instead of string literals.
pkg/cli/init.go
Outdated
| } | ||
|
|
||
| // Configure engine-specific settings | ||
| mcp := false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot rename to copilotMcp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to copilotMcp in commit fd1ffd0.
- Use constants.CopilotEngine, constants.ClaudeEngine, constants.CodexEngine instead of string literals - Rename variable mcp to copilotMcp for clarity Co-authored-by: pelikhan <[email protected]>
Plan: Update init command with interactive mode
Add interactive mode when init is invoked without arguments
Implementation approach:
init_command.goto detect when no engine/flags providedInitRepositoryInteractivefunction using huh library for promptstokens_bootstrap.gologic for secret recommendationsgh secret setcommandTesting:
Documentation:
Code Quality:
Summary
Successfully implemented interactive mode for the
initcommand with all requested improvements:Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.