-
-
Notifications
You must be signed in to change notification settings - Fork 103
feat: Add Range Delete Command #1088
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
The Label Bot has predicted the following:
|
…ments in range_delete_test.go
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1088 +/- ##
==========================================
+ Coverage 20.00% 20.08% +0.08%
==========================================
Files 21 22 +1
Lines 2655 2753 +98
==========================================
+ Hits 531 553 +22
- Misses 2071 2147 +76
Partials 53 53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR introduces the Range Delete Command to delete kubeconfig contexts based on a specified matching pattern.
- Implements the range delete logic and adds the corresponding Cobra command
- Updates both user documentation and unit tests for the new feature
- Registers the new command in the CLI entry point
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
docs/en-us/cli/kubecm_range-delete_docs.md | Added documentation page for the range delete command |
docs/en-us/cli/kubecm_range-delete.md | Provided command usage, examples, and options for the feature |
cmd/range_delete_test.go | Added unit tests to cover the matching logic |
cmd/range_delete.go | Implemented the new range delete command logic |
cmd/cmd.go | Registered the new RangeDeleteCommand in the CLI |
# Open add command document page | ||
kubecm add docs | ||
|
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.
The command example appears to be incorrect; consider changing 'kubecm add docs' to 'kubecm range-delete docs' to accurately reflect the new command.
# Open add command document page | |
kubecm add docs | |
# Delete contexts matching the pattern "test-*" | |
kubecm range-delete docs --pattern "test-*" |
Copilot uses AI. Check for mistakes.
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.
Also, please add the e2e test case for range delete
cmd to https://github.com/sunny0826/kubecm/blob/master/.github/workflows/e2e-test.yaml
@mayooot code looks good enough, please add e2e tests. |
… to support forced deletion.
65b5a64
to
c123037
Compare
Sure,I'm done. |
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.
LGTM
Thank you for your valuable contribution to this project! Your work is greatly appreciated. 🎆
@all-contributors please add @mayooot for code/doc/test |
I couldn't determine any contributions to add, did you specify any contributions? |
@all-contributors |
I've put up a pull request to add @mayooot! 🎉 |
Description
Add Range Delete Command.
Usage:
Related Issue
#1079
Type of Change
Checklist
make build
andmake test
commands.make doc-gen
to generate new documentation.