[WIP] CONSOLE-5194: Add Claude Code skill for OCPBUG Jira creation#16334
[WIP] CONSOLE-5194: Add Claude Code skill for OCPBUG Jira creation#16334sg00dwin wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@sg00dwin: This pull request references CONSOLE-5194 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sg00dwin 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 |
📝 WalkthroughWalkthroughUpdates 🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/settings.json:
- Around line 65-72: The allow list is missing the fallback permission
"mcp__atlassian__createJiraIssue" referenced in the skill docs; add the
permission string "mcp__atlassian__createJiraIssue" to the same array that
contains "mcp__jira__jira_create_issue", "mcp__jira__jira_update_issue", etc.,
so the skill's fallback to the Atlassian tool will work when the primary Jira
tool is unavailable.
- Around line 69-72: Remove the permissions that contradict the skill's safety
model by deleting "mcp__jira__jira_upload_attachment",
"mcp__jira__jira_add_comment", and "mcp__jira__jira_update_issue" from the
permissions array in .claude/settings.json so the skill cannot upload
attachments, add comments, or update issues; keep only the minimal permissions
needed for creating new issues (e.g., leave any create-only Jira permission and
"mcp__google-docs__drive_files_create" if needed for saving supporting files
locally).
In @.claude/skills/create-ocpbug/SKILL.md:
- Around line 58-70: The "Target Version" required field in the SKILL.md table
is not being checked by the pre-submit validation checklist; update the
pre-submit validation logic (the function/block that validates required fields
in the "pre-submit validation checklist"/preSubmitValidation) to include "Target
Version" alongside the other required fields so submissions fail fast when it is
empty, and add a clear validation message referencing the "Target Version"
field.
- Line 88: The Priority enum is inconsistent between the "Priority" table (the
header row showing options including "Blocker") and the later allowed-values
rule that excludes "Blocker"; pick a single canonical set and make both places
match: either remove "Blocker" from the Priority table or add "Blocker" to the
allowed-values list so the "Priority" table and the allowed-value validation
(the later allowed-values section) use the exact same enum entries; update both
occurrences in .claude/skills/create-ocpbug/SKILL.md (the Priority table and the
allowed-values rule) so they are identical.
- Around line 40-42: Several fenced code blocks lack language identifiers
(triggering markdownlint MD040); update each fence to include the correct
language: change the Jira query block containing `text ~ "<keywords>" AND
project in (OCPBUGS, CONSOLE) ORDER BY created DESC` to use ```sql, change the
blocks that contain plain descriptions such as the block starting with
`DESCRIPTION OF PROBLEM` and the preview block beginning `─── OCPBUGS Issue
Preview ───` to use ```text, and change the block listing saved files (the block
containing `Supporting files saved locally:` and `-
/tmp/ocpbug-stack-trace.txt`) to use ```text so all fenced blocks have explicit
language identifiers.
🪄 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: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: efe1eb34-fb33-48c3-8011-a09a84c3fb7d
📒 Files selected for processing (2)
.claude/settings.json.claude/skills/create-ocpbug/SKILL.md
📜 Review details
🧰 Additional context used
🪛 LanguageTool
.claude/skills/create-ocpbug/SKILL.md
[style] ~234-~234: This phrasing can be overused. Try elevating your writing with a more formal alternative.
Context: ...k, Google Drive, etc.). 3. Ask the user if they want to: - Link this bug to an existing ...
(IF_YOU_WANT)
🪛 markdownlint-cli2 (0.22.1)
.claude/skills/create-ocpbug/SKILL.md
[warning] 40-40: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 100-100: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 174-174: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 227-227: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔀 Multi-repo context openshift/console-operator
[::openshift/console-operator::] .claude/settings.json — current file at repo root (shown contents). The file contains the permissions.allow list (excerpted keys found): "Bash(claude --version)" plus many existing Bash/WebFetch/oc/kubectl/git/gh/dockers entries. No existing entries for Jira MCP or Google Drive MCP were present in this repo copy.
Location: .claude/settings.json (full file printed in shell output)
[::openshift/console-operator::] Repository contents — .claude directory present with commands/ and settings.json; no .claude/skills/create-ocpbug directory or SKILL.md present in this clone.
Location: .claude/ (listed contents)
Findings summary:
- The PR claims to update .claude/settings.json to add Jira MCP and Google Drive permissions and to add a new skill documentation file (.claude/skills/create-ocpbug/SKILL.md). In this repository snapshot, settings.json exists but does not contain the additional Jira/Google Drive permissions, and the new skill file is not present. No code in the repository references .claude settings or the proposed skill; the change appears to be documentation/config-only and has no cross-repo API/type impacts.
f41e2fc to
04b1024
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/skills/create-ocpbug/SKILL.md:
- Around line 96-104: Update Step 2b to require explicit sensitive-data
redaction and a retention/cleanup policy for artifacts saved under
.claude/local/tmp/: before saving any user-provided content (as described in
Step 2b) prompt the user that you will copy files to .claude/local/tmp/ and ask
them to confirm whether they want automated redaction (offer patterns to strip
like credentials, tokens, IPs, and PII) or to supply a redacted file; record the
chosen redaction action and the exact saved paths for later upload in Step 5b
and reference in Step 6; after the flow completes ensure a documented retention
policy (e.g., delete files automatically after X days or immediately upon user
request) and add a final cleanup step that securely removes files from
.claude/local/tmp/ and logs that cleanup so artifacts aren’t retained
unnecessarily.
- Line 5: Replace the wildcard MCP permissions in the allowed-tools entry so the
skill uses least-privilege scopes: remove mcp__jira__* and mcp__google-docs__*
and substitute explicit, minimal permissions required (e.g., the specific
mcp__jira__read, mcp__jira__write, or exact mcp__google-docs__read/write scopes
your workflow uses) rather than broad wildcards; update the allowed-tools line
in .claude/skills/create-ocpbug/SKILL.md (the allowed-tools symbol) to list only
those precise scopes and any other narrowly scoped tools needed.
🪄 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: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: e98d1a3c-c671-49c9-b0c9-c67ffbdeab12
📒 Files selected for processing (2)
.claude/settings.json.claude/skills/create-ocpbug/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .claude/settings.json
📜 Review details
🧰 Additional context used
🪛 LanguageTool
.claude/skills/create-ocpbug/SKILL.md
[style] ~266-~266: This phrasing can be overused. Try elevating your writing with a more formal alternative.
Context: ...ive upload was skipped. 4. Ask the user if they want to: - Link this bug to an existing ...
(IF_YOU_WANT)
🔀 Multi-repo context openshift/console-operator
[::openshift/console-operator::] .claude/settings.json — current file at repo root (shown contents). The file contains the permissions.allow list (excerpted keys found): "Bash(claude --version)" plus many existing Bash/WebFetch/oc/kubectl/git/gh/dockers entries. No existing entries for Jira MCP or Google Drive MCP were present in this repo copy.
Location: .claude/settings.json (full file printed in shell output)
[::openshift/console-operator::] Repository contents — .claude directory present with commands/ and settings.json; no .claude/skills/create-ocpbug directory or SKILL.md present in this clone.
Location: .claude/ (listed contents)
Findings summary:
- The PR claims to update .claude/settings.json to add Jira MCP and Google Drive permissions and to add a new skill documentation file (.claude/skills/create-ocpbug/SKILL.md). In this repository snapshot, settings.json exists but does not contain the additional Jira/Google Drive permissions, and the new skill file is not present. No code in the repository references .claude settings or the proposed skill; the change appears to be documentation/config-only and has no cross-repo API/type impacts.
04b1024 to
9687cc3
Compare
Adds a Claude Code skill that walks users through creating bug reports in the OCPBUGS Jira project via the Jira MCP server. The skill handles duplicate checking, structured field collection, description formatting, and issue submission. Also adds Jira MCP and Google docs drive tool permissions to the shared settings.json so developers with Jira MCP configured can use the skill without local permission setup. Assisted by Claude Code
9687cc3 to
b5abe2b
Compare
|
/retest-required |
There was a problem hiding this comment.
should we merge it with the existing /bug skill?
There was a problem hiding this comment.
The 2 skills definitely overlap, but also have some differences. So the team will need to decide what's the preferred path.
/bug is an all in one: "find it → file it → fix it"
/create-bug is focused solely on bug creation: duplicate checking → guided field collection and supporting file upload → preview → submit
There was a problem hiding this comment.
or we could differentiate the names, maybe /fix-bug and /report-bug
|
@sg00dwin: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description:
Adds a
/create-bugClaude Code skill that guides developers through creating structured OCPBUGS Jira issues via the Jira MCP server. The skill provides:Also adds Jira MCP and Google Drive tool permissions to the shared .claude/settings.json so developers with Jira MCP configured can use the skill without local permission setup.
Settings.json changes:
The following MCP tool permissions are added to the shared allow list:
mcp__jira__jira_auth_status— Check Jira authenticationmcp__jira__jira_search_issues_summary— Duplicate checkingmcp__jira__jira_create_issue— Issue creationmcp__jira__jira_get_create_metadata— Field discovery fallbackmcp__jira__jira_upload_attachment— Attachment upload (future use; CONSOLE project supports attachments via the API, but OCPBUGS does not :/ )mcp__jira__jira_add_comment— Adding commentsmcp__jira__jira_update_issue— Updating issue descriptionsmcp__google-docs__drive_files_create— Google Drive file uploadPrerequisites for developers:
Relationship to existing skills:
This skill focuses on creating new OCPBUGS Jira issues.
What
/create-bugdoes (this PR)Focused solely on Jira issue creation: duplicate checking → guided field collection → structured description → preview → submit.
What
/bugdoesA single-session, linear workflow: describe a bug → investigate the codebase → write a Jira-formatted bug report → optionally create the Jira issue (via
jiraCLI) → optionally create a branch → propose a fix with regression tests. It's essentially "find it, file it, fix it" in one pass.Known limitations:
AskUserQuestiontool, will it fail with "Invalid tool parameters" because the tool is deferred — its schema isn't loaded until you explicitly call ToolSearch to fetch it. Skills can't reliably instruct Claude to do that prerequisite step before invoking the tool, so it fails.Test cases:
Additional info: Recommendation: Separate Skills per Issue Type (Bug, Story, RFE)
Rather than one combined skill for all issue types, separate skills are preferred because:
Assisted by Claude Code