Remove --create-pull-request and --push flags from add command#19016
Remove --create-pull-request and --push flags from add command#19016
add command#19016Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
add command
|
@copilot split the interface types for add wizard and finish the cleanup |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in b7921d3. Split the types as follows:
|
|
@copilot render the help of add and add-wizard |
|
@copilot remove the --push option of add command. The add command should not interact with git. Only the add-wizard does git operations. |
Both
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 57f9a23. Removed Updated help:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
add commandadd command
The
addcommand was conflating workflow installation with git operations and PR creation, which diverges from standard package manager behavior (e.g.,npm install,go get). Git operations and PR creation are the add-wizard's responsibility.Changes
add_command.go: Removed--create-pull-request/--prflags and--pushflag, theirRunEreading code, and corresponding opts assignments. Removed!prFlaggate from theuseInteractivecondition. Cleaned up Long description examples and flag notes. RemovedCreatePRandPushfromAddOptions; removedPRNumber/PRURLfromAddWorkflowsResult. Removed thecommitAndPushblock fromaddWorkflowsWithTracking.add_workflow_pr.go: AddedAddWizardResulttype (holdsPRNumber,PRURL,HasWorkflowDispatch) andAddResolvedWorkflowsWithPRfunction that encapsulates PR prerequisite checks, branch creation, commit, push, and PR creation for the wizard.add_interactive_git.go: Updated to callAddResolvedWorkflowsWithPRdirectly instead of passingCreatePR: trueorPush: truethroughAddOptions.add_interactive_orchestrator.go: Updated to store*AddWizardResultinstead of*AddWorkflowsResult.add_command_test.go: Removed assertions for deleted flags and PR fields; simplifiedTestAddWorkflowsResult.add_workflow_pr_test.go: AddedTestAddWizardResultto cover the new wizard result type.Original prompt
🔒 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.