Claude plugin oadp cli#209
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: NicholasYancey The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📝 WalkthroughWalkthroughAdds marketplace and plugin manifests for ChangesOADP CLI plugin packaging and docs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/oadp-cli/README.md`:
- Around line 10-16: The markdown file-tree block in README.md is missing a
language label, causing markdownlint MD040. Update the opening fence for the
tree snippet to use a text label so the fenced code block is properly
identified; this change should be made in the README.md content that shows the
plugin structure.
In `@plugins/oadp-cli/skills/backup-restore/SKILL.md`:
- Around line 90-91: The CLI examples in SKILL.md are too broad and imply a
top-level verb-noun command that does not exist. Update the backup-restore usage
text to keep the noun-verb example for `oc oadp backup create` and narrow the
verb-noun example to the `nonadmin` command path, using the backup-restore skill
section as the place to adjust the documented command forms.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3d456a38-97a8-4baf-9c22-e60664852976
📒 Files selected for processing (4)
.claude-plugin/marketplace.jsonplugins/oadp-cli/.claude-plugin/plugin.jsonplugins/oadp-cli/README.mdplugins/oadp-cli/skills/backup-restore/SKILL.md
| ``` | ||
| .claude-plugin/marketplace.json # repo root — Claude marketplace `oadp-cli-plugins` | ||
| plugins/oadp-cli/ | ||
| ├── .claude-plugin/plugin.json # plugin manifest | ||
| ├── skills/backup-restore/SKILL.md # skill content — edit this | ||
| └── README.md | ||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Label the file-tree fence for markdownlint.
The opening fence is unlabeled, which triggers MD040. A text label is enough to keep the docs lintable.
Proposed fix
-```
+```text📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| .claude-plugin/marketplace.json # repo root — Claude marketplace `oadp-cli-plugins` | |
| plugins/oadp-cli/ | |
| ├── .claude-plugin/plugin.json # plugin manifest | |
| ├── skills/backup-restore/SKILL.md # skill content — edit this | |
| └── README.md | |
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 10-10: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@plugins/oadp-cli/README.md` around lines 10 - 16, The markdown file-tree
block in README.md is missing a language label, causing markdownlint MD040.
Update the opening fence for the tree snippet to use a text label so the fenced
code block is properly identified; this change should be made in the README.md
content that shows the plugin structure.
Source: Linters/SAST tools
| Noun-verb and verb-noun order both work, e.g. `oc oadp backup create` and | ||
| `oc oadp create backup`. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
rg -nP --type=go 'Use:\s*"(?:create backup|backup create)"' cmd pluginsRepository: migtools/oadp-cli
Length of output: 155
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Locate the documented skill file and nearby command definitions.
git ls-files 'plugins/oadp-cli/skills/backup-restore/SKILL.md' \
'cmd/**' 'plugins/**' | sed -n '1,200p'
echo "----"
# Search for the exact noun/verb variants and common Cobra wiring.
rg -n --hidden --no-ignore -S \
'create backup|backup create|Aliases:|Use:|backup.*create|create.*backup' \
plugins cmdRepository: migtools/oadp-cli
Length of output: 13811
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '150,260p' cmd/root.go
echo "----"
sed -n '1,220p' cmd/non-admin/verbs/verbs.go
echo "----"
sed -n '1,220p' cmd/non-admin/backup/backup.goRepository: migtools/oadp-cli
Length of output: 10463
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show how the root command wires subcommands.
sed -n '1,260p' cmd/root.go
echo "----"
# Show the SKILL.md context around the claimed forms.
sed -n '80,100p' plugins/oadp-cli/skills/backup-restore/SKILL.md
echo "----"
# Find all "create backup" command registrations or delegations.
rg -n --hidden --no-ignore -S 'NewCreateCommand\(|AddCommand\(|Use:\s*"create"|Use:\s*"backup"' cmd pluginsRepository: migtools/oadp-cli
Length of output: 12968
Narrow the verb-noun example in plugins/oadp-cli/skills/backup-restore/SKILL.md:90-91 The create backup form exists only under oc oadp nonadmin (oc oadp nonadmin create backup / oc oadp nonadmin backup create); oc oadp create backup is not a top-level command.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@plugins/oadp-cli/skills/backup-restore/SKILL.md` around lines 90 - 91, The
CLI examples in SKILL.md are too broad and imply a top-level verb-noun command
that does not exist. Update the backup-restore usage text to keep the noun-verb
example for `oc oadp backup create` and narrow the verb-noun example to the
`nonadmin` command path, using the backup-restore skill section as the place to
adjust the documented command forms.
Why the changes were made
Adds a Claude Code plugin under plugins/oadp-cli/ so assistants recommend oc oadp / kubectl oadp for OpenShift backup and restore instead of generic oc/kubectl or manual CRD edits.
How to test the changes made
Restart Claude Code or run /reload-plugins, then:
Expect responses to point to oc oadp setup and admin or nonadmin commands.
After merge use Claude marketplace
Summary by CodeRabbit