-
Notifications
You must be signed in to change notification settings - Fork 0
Add rename command
#366
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
Add rename command
#366
Conversation
Co-authored-by: geofflamrock <2915931+geofflamrock@users.noreply.github.com>
Co-authored-by: geofflamrock <2915931+geofflamrock@users.noreply.github.com>
rename commandrename command to change stack names
| Required = false | ||
| }; | ||
|
|
||
| public static Option<string?> Name { get; } = new Option<string?>("--name", "-n") |
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 move this into the rename command directly, it shouldn't be common as it's not going to be used across multiple commands and is specific to the rename command.
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.
Moved the Name option from CommonOptions to RenameStackCommand as a local static option since it's only used by the rename command. This follows the same pattern as other commands like NewStackCommand that define their own specific options. (035a2d5)
…validation Co-authored-by: geofflamrock <2915931+geofflamrock@users.noreply.github.com>
| throw new InvalidOperationException("Stack not found."); | ||
| } | ||
|
|
||
| var newName = await inputProvider.Text(logger, Questions.NewStackName, inputs.Name, cancellationToken); |
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 instead of using this new question, use the existing Questions.StackName. Do NOT change the question text of Questions.StackName, just use it here and fix any tests.
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.
Changed to use Questions.StackName instead of Questions.NewStackName and updated all related tests. All 201 tests continue to pass. (82f290c)
…command prompts Co-authored-by: geofflamrock <2915931+geofflamrock@users.noreply.github.com>
Co-authored-by: geofflamrock <2915931+geofflamrock@users.noreply.github.com>
rename command to change stack namesrename command
Features
The new command provides:
--stackoption to specify which stack to rename--nameoption to specify the new stack nameUsage Examples
Implementation Details
ChangeNamemethod to theStackrecord using immutable record patternRenameStackCommandandRenameStackCommandHandlerfollowing existing patterns--nameoption to be command-specific rather than commonQuestions.StackNameTesting
Added 9 comprehensive unit tests covering:
All 202 existing tests continue to pass, ensuring no regressions.
Fixes #363.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.