Add create-jira-from-file skill with model-optimized phases - #632
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vthapar 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 |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds the ChangesJira file-based issue creation
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant CreateJiraFromFile
participant MarkdownFile
participant JiraMCP
User->>CreateJiraFromFile: provide markdown file
CreateJiraFromFile->>MarkdownFile: read and detect issue mode
CreateJiraFromFile->>User: present extracted issues
User->>CreateJiraFromFile: approve or edit issues
CreateJiraFromFile->>JiraMCP: validate fields and relationships
JiraMCP-->>CreateJiraFromFile: validation results
CreateJiraFromFile->>JiraMCP: create issues and link parents
JiraMCP-->>CreateJiraFromFile: creation results
CreateJiraFromFile-->>User: report outcomes
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 9 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (9 passed)
✨ 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: 12
🤖 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 `@docs/index.html`:
- Around line 1459-1465: Regenerate the create-jira-from-file command entry in
docs/index.html from plugins/jira/commands/create-jira-from-file.md, populating
full_name, synopsis, and body_html with the documented command details while
preserving the existing name and description.
In `@plugins/jira/commands/create-jira-from-file.md`:
- Line 8: Update the introductory description in create-jira-from-file.md to
require only the mandatory metadata, retaining Project as required and
describing Component and Version as optional to match the following section.
In `@plugins/jira/skills/create-jira-from-file/phase4-validate.md`:
- Around line 104-123: The missing-type validation flow must accept the
documented “Sub-task” issue type. Update the required issue-type list and the
fallback prompt in the validation logic around auto_detect_type to include
“Sub-task,” while preserving the existing handling for Story, Bug, Epic, Task,
and Feature.
In `@plugins/jira/skills/create-jira-from-file/SKILL.md`:
- Around line 705-712: Update the fields construction so the universal
"ai-generated-jira" label is merged with issue.labels rather than replacing it.
Deduplicate the combined labels while preserving all user-provided labels, and
keep the existing default label applied.
- Around line 685-689: Update the should_apply_conventions calculation to safely
handle missing issue.component values before performing keyword substring
matching. Within the component-matching any expression, use an empty-string
fallback or an equivalent presence check, while preserving the existing matching
behavior for populated components.
- Around line 161-172: Update the Jira hierarchy definitions in
plugins/jira/skills/create-jira-from-file/SKILL.md lines 161-172 and mirror the
same changes in plugins/jira/skills/create-jira-from-file/phase4-validate.md
lines 161-172: treat Feature and Initiative as sibling strategic levels above
Epic, and include Initiative anywhere Feature is accepted in the parent/child
validation and execution rules. Keep both documents consistent.
- Around line 662-674: Update the “Universal Defaults” guidance to remove the
unconditional security.name value “Red Hat Employee.” In the create-Jira
workflow, validate the target project’s available security schemes and apply
that security level only when supported and explicitly intended; keep labels and
contentFormat as universal defaults.
- Around line 74-79: Update the Detection Logic in SKILL.md to recognize every
documented batch indicator: multiple plain H2 sections, supported typed H2
headers, and `---` separators, including separator-only input. Keep single-issue
input classified as SINGLE ISSUE MODE, and align the command documentation with
the expanded detection behavior.
- Around line 358-362: Update Phase 4 validation to separate read-only checks
from interactive remediation: run only non-interactive validations concurrently,
then process prompt_user, confirm, and choice-based remediation sequentially per
issue. Serialize all user prompts and result mutations, while still aggregating
every validation failure and blocking creation for any issue that fails.
- Around line 241-253: Align the Phase 2 schema and all downstream extraction,
validation, and execution logic to use the field names consumed later: replace
issue_type with type, fix_version with version, and parent with parent_key.
Update the related symbols and references consistently so Type, Version, and
Parent metadata flow through without missing-field lookups.
- Around line 757-762: Update the failure-record construction in the
issue-processing exception handlers to remove the full issue object from
issue_data. Include only a sanitized issue identifier and safe remediation
metadata, ensuring downstream reporting cannot expose the complete
Markdown-derived content; apply the same change to the corresponding handler
near the additional referenced location.
- Around line 731-733: Repair parent resolution in the issue-creation flow
around created_issues and issue.parent_key: remove the undefined parent_key
lookup and use one mapping from source issue references to Jira keys. Populate
it for both newly created and validated pre-existing parents, then link children
through that mapping. If a parent is unavailable or failed in-batch, fail or
defer the dependent child instead of creating it orphaned, including the related
logic at the later dependent-issue handling block.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b0dbcfb0-6737-4ef5-b169-203e3d5fc023
📒 Files selected for processing (8)
.claude-plugin/marketplace.jsondocs/index.htmlplugins/jira/.claude-plugin/plugin.jsonplugins/jira/commands/create-jira-from-file.mdplugins/jira/examples/create-jira-from-file-batch.mdplugins/jira/examples/create-jira-from-file-single-story.mdplugins/jira/skills/create-jira-from-file/SKILL.mdplugins/jira/skills/create-jira-from-file/phase4-validate.md
|
|
||
| # Create Jira from Markdown | ||
|
|
||
| Create one or more Jira issues from a markdown file. All metadata (project, component, version) must be specified in the markdown file itself. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Clarify which metadata is required.
This says Project, Component, and Version must all be present, but the following section marks Component and Version as optional. Change the introduction to require only the fields that are actually mandatory.
🤖 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/jira/commands/create-jira-from-file.md` at line 8, Update the
introductory description in create-jira-from-file.md to require only the
mandatory metadata, retaining Project as required and describing Component and
Version as optional to match the following section.
5576284 to
433102e
Compare
There was a problem hiding this comment.
Actionable comments posted: 8
♻️ Duplicate comments (2)
plugins/jira/skills/create-jira-from-file/SKILL.md (2)
369-373: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy liftSerialize interactive validation.
The workflow requires all validations to run in parallel, but the validation branches call
prompt_user,confirm, and mutate issue state. Concurrent prompts can interleave across issues and produce nondeterministic edits. Parallelize only read-only checks, then process prompts and mutations sequentially.Also applies to: 477-507
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 369 - 373, Update Phase 4 validation and its corresponding flow around the referenced validation branches to separate read-only checks from interactive work: run only independent, non-mutating checks in parallel, then process prompt_user, confirm, and issue-state mutations sequentially per issue. Preserve aggregation of all validation failures and block creation for each issue that fails.
755-757: 🗄️ Data Integrity & Integration | 🔴 Critical | 🏗️ Heavy liftUse one identifier map for parent and failure tracking.
created_issuesis populated withissue.idkeys but queried usingissue.parent_keyJira keys, so newly created parents are not linked.failed_issueshas the same mismatch, allowing children of failed parents to proceed. Maintain explicit source-reference-to-Jira-key and failed-source-reference mappings, and block children whose parents are unavailable.Also applies to: 916-929
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 755 - 757, Update the issue creation flow around created_issues and failed_issues to track parents consistently by source reference: maintain separate mappings from each issue.id to its created Jira key and failure status, then resolve issue.parent_key through the source-reference mapping before setting fields["parent"]. Block processing when the parent source reference is missing, failed, or not yet created, while preserving normal creation for issues without parents.
🤖 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/jira/skills/create-jira-from-file/SKILL.md`:
- Around line 74-85: Update the Detection Logic in create-jira-from-file to
remove YAML front matter before evaluating separator-based batch detection. Run
the horizontal-rule check only against the remaining Markdown content, while
preserving the existing header checks and SINGLE ISSUE MODE fallback.
- Around line 166-193: Update the Type Auto-Detection fallback and corresponding
Phase 2 handling to preserve a missing type instead of assigning Task. Ensure
required-field validation detects the absent type and prompts the user, while
retaining explicit types and successfully detected Story, Bug, Epic, and
Sub-task values.
- Around line 375-391: Update the Security Validation instructions and
corresponding Phase 2 flow to scan every extracted text field that can reach
Jira, including user stories, environment, expected/actual behavior, technical
notes, and testing notes in addition to the currently listed fields. Ensure
validation covers the complete issue payload before creation, or explicitly
enumerate all payload fields so no extracted content bypasses credential
detection.
- Around line 122-127: Make the summary extraction behavior consistent between
Phase 2 single-issue handling and the later unstructured-Markdown fallback
described in the same SKILL.md. Update the single-mode logic to use the
documented first-sentence and filename fallbacks when no H1 exists, or remove
those fallback guarantees if immediate failure is the intended behavior; ensure
the documentation describes only the reachable behavior.
- Around line 339-343: Update the universal-defaults documentation and related
review, summary, and mixed-project guidance around the documented examples to
remove Security: Red Hat Employee as an unconditional default. State instead
that Red Hat Employee is applied only when supported by the target project,
including the corresponding sections at the other referenced examples.
- Around line 530-541: Update the hierarchy documentation and validation
guidance around the hierarchy-level rules to treat Initiative identically to
Feature: include Initiative wherever Feature is listed as an accepted type,
mirror the same parent/child examples and validation text, and apply the changes
to the execution-order guidance and the sections corresponding to the additional
referenced ranges.
- Around line 103-109: Standardize the metadata schema across extraction,
validation, and execution by using issue_type, fix_version, and parent
consistently instead of issue.type, issue.version, and issue.parent_key. Update
all affected references, including the cross-project validation message, while
preserving the existing optional and required-field behavior.
- Around line 932-949: Update the exception handler around createJiraIssue in
the issue-processing loop so failed_issues.add records issue.id directly instead
of accessing result before assignment. Preserve str(e) in the failure details
and continue processing subsequent issues.
---
Duplicate comments:
In `@plugins/jira/skills/create-jira-from-file/SKILL.md`:
- Around line 369-373: Update Phase 4 validation and its corresponding flow
around the referenced validation branches to separate read-only checks from
interactive work: run only independent, non-mutating checks in parallel, then
process prompt_user, confirm, and issue-state mutations sequentially per issue.
Preserve aggregation of all validation failures and block creation for each
issue that fails.
- Around line 755-757: Update the issue creation flow around created_issues and
failed_issues to track parents consistently by source reference: maintain
separate mappings from each issue.id to its created Jira key and failure status,
then resolve issue.parent_key through the source-reference mapping before
setting fields["parent"]. Block processing when the parent source reference is
missing, failed, or not yet created, while preserving normal creation for issues
without parents.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: f15fa50e-d54b-46a3-891a-65a483493650
📒 Files selected for processing (8)
.claude-plugin/marketplace.jsondocs/index.htmlplugins/jira/.claude-plugin/plugin.jsonplugins/jira/commands/create-jira-from-file.mdplugins/jira/examples/create-jira-from-file-batch.mdplugins/jira/examples/create-jira-from-file-single-story.mdplugins/jira/skills/create-jira-from-file/SKILL.mdplugins/jira/skills/create-jira-from-file/phase4-validate.md
🚧 Files skipped from review as they are similar to previous changes (3)
- plugins/jira/commands/create-jira-from-file.md
- plugins/jira/skills/create-jira-from-file/phase4-validate.md
- plugins/jira/examples/create-jira-from-file-batch.md
| Extract inline metadata from **bold key:** patterns anywhere in the markdown: | ||
|
|
||
| - **Project:** → `project` (REQUIRED; fail with clear error if missing) | ||
| - **Type:** → `issue_type` (Story, Task, Bug, Epic, Feature, Sub-task; optional, can be auto-detected) | ||
| - **Component:** → `component` (optional) | ||
| - **Version:** → `fix_version` (optional) | ||
| - **Parent:** → `parent` (epic/story key like PROJ-123; optional) |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Use one metadata schema across all phases.
Phase 2 emits issue_type, fix_version, and parent, while validation and execution consume issue.type, issue.version, and issue.parent_key. Type, version, and parent data will therefore be lost or treated as missing. Standardize these names everywhere, including the cross-project validation message.
Also applies to: 252-263, 560-564
🧰 Tools
🪛 SkillSpector (2.3.11)
[error] 388: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
(Privilege Escalation (PE3))
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 103 - 109,
Standardize the metadata schema across extraction, validation, and execution by
using issue_type, fix_version, and parent consistently instead of issue.type,
issue.version, and issue.parent_key. Update all affected references, including
the cross-project validation message, while preserving the existing optional and
required-field behavior.
433102e to
b42693d
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
♻️ Duplicate comments (3)
plugins/jira/skills/create-jira-from-file/SKILL.md (3)
388-400: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winScan every user-controlled field that can reach Jira.
The security scan lists content fields but omits metadata later serialized by execution, including
component,version,priority,labels, andparent_key. A credential placed in one of those fields bypasses the stated security gate. Scan the complete payload or explicitly enumerate every excluded field.Also applies to: 734-764
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 388 - 400, Expand the credential scan in the create-Jira workflow to cover every user-controlled value serialized into the Jira payload, including component, version, priority, labels, and parent_key in addition to the listed text fields. Implement the scan over the complete payload, or explicitly include each metadata field in the scan before submission.
382-383: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winSerialize interactive validation and remediation.
The workflow says to run all validations in parallel, but the checks invoke
prompt_userandconfirmand mutate issue state. Parallel prompts can interleave and produce nondeterministic results. Run read-only checks concurrently, then serialize prompts and result aggregation.🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 382 - 383, Update the issue validation workflow described in “Validate all parsed issue(s) before creation” to separate read-only checks from interactive remediation. Run only non-interactive validations concurrently, then process prompt_user/confirm calls and issue-state mutations sequentially per issue, aggregating results deterministically before allowing creation.
70-80: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winFix mode detection for bracket headers and ordinary single-issue sections.
Line 72’s regex cannot match documented headers such as
## [Story] ...; it expects the type name immediately after##. Also, counting any two plain H2 headings classifies the documented single-issue example’sAcceptance Criteria,Context, andDependenciessections as batch issues. Use separate typed-header matching and avoid treating standard content headings as issue boundaries.Also applies to: 1121-1129
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 70 - 80, Update the Detection Logic in SKILL.md so typed H2 matching accepts both colon and bracket forms, including headers like “## [Story] ...”, while retaining the documented issue types. Revise plain H2 detection to exclude standard single-issue content headings such as Acceptance Criteria, Context, and Dependencies, so they do not create batch boundaries; apply the same correction to the corresponding detection logic later in the document.
🤖 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/jira/skills/create-jira-from-file/SKILL.md`:
- Around line 261-278: Update the issue-creation payload before createJiraIssue
so every extracted field—acceptance_criteria, user_story, expected_behavior,
actual_behavior, environment, technical_notes, and testing_notes—is preserved,
either by merging them into description or mapping them to supported Jira
fields. Apply the same change to both issue-creation paths identified in the
diff.
- Around line 774-798: The createJiraIssue error-handling examples around the
main creation flow and the additional sections must use a single ordered handler
chain. Handle component, version, permission, and field-validation exceptions
before the generic Exception fallback so their documented guidance and retry
behavior remain reachable; keep the generic handler last.
- Around line 194-199: The sub-task detection guidance must not treat a Parent:
field alone as evidence of type Sub-task. Update the Sub-task indicators in the
relevant type-detection instructions to require an explicit type/prefix or
another unambiguous sub-task marker, while preserving the null fallback so Phase
4 validation prompts for unspecified types.
- Around line 571-575: Use one resolved parent-reference mapping throughout the
create-Jira workflow: resolve each source parent reference to its Jira issue
key, including pre-existing parents, before cross-project validation and child
processing. Update the validation near the parent project check to use the
resolved key instead of undefined parent_key, and align created_issues and
failed_issues lookups with Jira keys so in-batch linking and failed-parent
skipping work correctly at the related handling points.
- Around line 390-400: Expand the credential detection guidance in the
documented patterns to cover realistic AWS secret-key formats and additional
private-key types, including EC and OpenSSH keys. Prefer integrating a tested
secret-scanning implementation; otherwise, add fixtures that validate every
supported credential format before allowing the detection flow to proceed.
---
Duplicate comments:
In `@plugins/jira/skills/create-jira-from-file/SKILL.md`:
- Around line 388-400: Expand the credential scan in the create-Jira workflow to
cover every user-controlled value serialized into the Jira payload, including
component, version, priority, labels, and parent_key in addition to the listed
text fields. Implement the scan over the complete payload, or explicitly include
each metadata field in the scan before submission.
- Around line 382-383: Update the issue validation workflow described in
“Validate all parsed issue(s) before creation” to separate read-only checks from
interactive remediation. Run only non-interactive validations concurrently, then
process prompt_user/confirm calls and issue-state mutations sequentially per
issue, aggregating results deterministically before allowing creation.
- Around line 70-80: Update the Detection Logic in SKILL.md so typed H2 matching
accepts both colon and bracket forms, including headers like “## [Story] ...”,
while retaining the documented issue types. Revise plain H2 detection to exclude
standard single-issue content headings such as Acceptance Criteria, Context, and
Dependencies, so they do not create batch boundaries; apply the same correction
to the corresponding detection logic later in the document.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b5b78079-f77d-4c1f-9db0-210ffbf3a948
📒 Files selected for processing (8)
.claude-plugin/marketplace.jsondocs/index.htmlplugins/jira/.claude-plugin/plugin.jsonplugins/jira/commands/create-jira-from-file.mdplugins/jira/examples/create-jira-from-file-batch.mdplugins/jira/examples/create-jira-from-file-single-story.mdplugins/jira/skills/create-jira-from-file/SKILL.mdplugins/jira/skills/create-jira-from-file/phase4-validate.md
🚧 Files skipped from review as they are similar to previous changes (7)
- plugins/jira/.claude-plugin/plugin.json
- plugins/jira/examples/create-jira-from-file-single-story.md
- .claude-plugin/marketplace.json
- plugins/jira/skills/create-jira-from-file/phase4-validate.md
- plugins/jira/commands/create-jira-from-file.md
- docs/index.html
- plugins/jira/examples/create-jira-from-file-batch.md
b42693d to
c9e3a5b
Compare
There was a problem hiding this comment.
Actionable comments posted: 8
♻️ Duplicate comments (1)
plugins/jira/skills/create-jira-from-file/SKILL.md (1)
788-790:⚠️ Potential issue | 🔴 CriticalRepair parent resolution and failed-parent tracking.
created_issuesis undefined, while the available maps use different key directions. Pre-existing parents are not attached, and failed in-batch parents are absent fromjira_key_to_issue_id, so children can still be created orphaned. Additionally, the specific exception handlers do not add failed issue IDs tofailed_batch_ids. Resolve source parent references to Jira keys once, use that mapping consistently, and mark every failed parent before processing children.Also applies to: 832-873, 888-918
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 788 - 790, Update the parent-resolution and failure-handling flow around the shown parent attachment and the exception handlers at issue creation: replace the undefined created_issues lookup with the available source-parent-to-Jira-key mapping so pre-existing and successfully created parents resolve consistently, and ensure every failed parent issue ID is added to failed_batch_ids before children are processed. Use the resolved Jira-key mapping when populating fields["parent"], preserving orphan prevention for descendants of failed parents.
🤖 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/jira/skills/create-jira-from-file/SKILL.md`:
- Around line 586-594: Update the component validation block using
getJiraProjectIssueTypesMetadata so it passes the parsed issue.project value
instead of the undefined project_key variable. Keep valid_components
construction and the existing warning, suggestion, and prompt behavior
unchanged.
- Around line 806-812: Consolidate the Jira issue creation flow into a single
loop around createJiraIssue, removing the duplicate creation loop and preserving
one result-processing path. Initialize created_jira_keys, jira_key_to_issue_id,
and successes before the loop, then populate them only after each successful
creation.
- Around line 832-854: The ComponentNotFoundError and VersionNotFoundError
handlers claim retry behavior but only append failures. Update the
batch-processing flow around these handlers to perform a bounded retry after
removing or replacing the invalid optional component/version, or remove the
retry wording from the component suggestion and report both cases as failed
without implying a retry.
- Around line 75-80: Update the batch-detection rules in the
create-Jira-from-file skill to identify actual issue boundaries rather than
treating multiple H2 sections or any thematic separator as separate issues.
Preserve the documented separator-based batch format, but require separators or
headings to represent distinct issue blocks, while keeping normal single-issue
sections such as Description, Acceptance Criteria, and Context together.
- Around line 826-830: Sanitize exception handling in the create-Jira workflow,
including the parent-link handler and the corresponding blocks around issue
linking and failure reporting. Do not interpolate raw exception objects or text
into user-facing warnings or failures; use a safe, generic error
category/message instead, while keeping any sanitized diagnostic details
separate for internal logging.
- Line 297: Add an appropriate language identifier to every fenced code block in
the skill documentation, including the blocks near the referenced sections; use
text for plain prose, json for JSON examples, python for Python code, and the
matching identifier for any other language, ensuring no unlabeled fences remain.
- Around line 709-725: Update the convention detection logic surrounding
projects_with_conventions, components_with_conventions, and
should_apply_conventions so it is project-agnostic: discover whether
jira:jira-conventions is available or load the project/component mapping from
extensible configuration rather than hard-coding allowlists. Preserve invoking
the skill and applying its returned defaults whenever convention support is
detected.
- Around line 1-6: Coordinate the create-jira-from-file skill changes with PR
`#632` before merging: compare ownership of SKILL.md and its companion
command/examples, then merge only one implementation or split the overlapping
content so the Jira plugin does not contain duplicates.
---
Duplicate comments:
In `@plugins/jira/skills/create-jira-from-file/SKILL.md`:
- Around line 788-790: Update the parent-resolution and failure-handling flow
around the shown parent attachment and the exception handlers at issue creation:
replace the undefined created_issues lookup with the available
source-parent-to-Jira-key mapping so pre-existing and successfully created
parents resolve consistently, and ensure every failed parent issue ID is added
to failed_batch_ids before children are processed. Use the resolved Jira-key
mapping when populating fields["parent"], preserving orphan prevention for
descendants of failed parents.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 6df26a8d-f90a-4e3b-857d-24ba59ece77f
📒 Files selected for processing (8)
.claude-plugin/marketplace.jsondocs/index.htmlplugins/jira/.claude-plugin/plugin.jsonplugins/jira/commands/create-jira-from-file.mdplugins/jira/examples/create-jira-from-file-batch.mdplugins/jira/examples/create-jira-from-file-single-story.mdplugins/jira/skills/create-jira-from-file/SKILL.mdplugins/jira/skills/create-jira-from-file/phase4-validate.md
🚧 Files skipped from review as they are similar to previous changes (7)
- plugins/jira/commands/create-jira-from-file.md
- plugins/jira/examples/create-jira-from-file-single-story.md
- plugins/jira/skills/create-jira-from-file/phase4-validate.md
- .claude-plugin/marketplace.json
- plugins/jira/.claude-plugin/plugin.json
- docs/index.html
- plugins/jira/examples/create-jira-from-file-batch.md
| except Exception as link_error: | ||
| warnings.append({ | ||
| "key": result["key"], | ||
| "message": f"Created but failed to link parent {issue.parent_key}: {link_error}" | ||
| }) |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Redact exception details before reporting failures.
The security rules prohibit echoing credentials, but these handlers propagate raw exception text into warnings and failures. MCP/API errors can include request fields or secret values. Return a safe error category/message and keep sanitized diagnostics separate from user-facing results.
Also applies to: 856-864, 875-883, 929-937
🧰 Tools
🪛 SkillSpector (2.3.11)
[error] 397: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
(Privilege Escalation (PE3))
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 826 - 830,
Sanitize exception handling in the create-Jira workflow, including the
parent-link handler and the corresponding blocks around issue linking and
failure reporting. Do not interpolate raw exception objects or text into
user-facing warnings or failures; use a safe, generic error category/message
instead, while keeping any sanitized diagnostic details separate for internal
logging.
c9e3a5b to
f37a8fe
Compare
There was a problem hiding this comment.
Actionable comments posted: 9
♻️ Duplicate comments (7)
plugins/jira/skills/create-jira-from-file/SKILL.md (7)
711-728: 🎯 Functional Correctness | 🟠 MajorKeep convention detection project-agnostic.
The hard-coded project and component allowlists prevent newly supported projects from invoking
jira:jira-conventions, contradicting the skill’s project-agnostic objective and the later “Do NOT hard-code project names” rule.🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 711 - 728, The convention detection block around should_apply_conventions must remain project-agnostic: remove the hard-coded projects_with_conventions and components_with_conventions allowlists, and determine applicability using the jira:jira-conventions skill’s generic criteria instead. Preserve invoking jira:jira-conventions and applying its returned defaults when those criteria match.
790-792: 🗄️ Data Integrity & Integration | 🔴 CriticalRepair parent resolution before creating children.
created_issuesis undefined, and the condition only links parents that were created in the current batch. Validated pre-existing parents will not be attached. Use one resolved source-reference-to-Jira-key mapping for both existing and newly created parents.Also applies to: 888-890
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 790 - 792, Update the parent-resolution logic surrounding the child creation flow and its corresponding occurrence near the later parent assignment: replace the undefined created_issues check with the resolved source-reference-to-Jira-key mapping, ensuring validated pre-existing parents and parents created in the current batch are both eligible. Use that same mapping to populate fields["parent"] with the resolved Jira key.
798-886: 🩺 Stability & Availability | 🔴 CriticalUse one creation loop and initialize state before it.
The file defines a complete creation loop and then defines a second loop that calls
createJiraIssue(...)again. The first loop also usessuccesses,failures,warnings, and mapping sets before they are initialized, so following the documented flow can both fail and create duplicates.Also applies to: 896-943
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 798 - 886, Remove the duplicate Jira creation loop and retain one ordered handler chain centered on createJiraIssue, including the specific exception handlers before the generic fallback. Initialize successes, failures, warnings, created_jira_keys, jira_key_to_issue_id, and failed_batch_ids before that loop begins, then ensure the single loop owns all issue creation and result tracking.
834-856: 🎯 Functional Correctness | 🟠 MajorImplement the documented component/version retry behavior.
These handlers only record failures, while the edge-case documentation promises retry after removing or replacing the invalid field. Either implement a bounded retry or remove the retry claim and consistently report the issue as failed.
Also applies to: 1201-1225
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 834 - 856, Update the ComponentNotFoundError and VersionNotFoundError handlers in the documented issue-creation flow to match the promised retry behavior: implement a bounded retry after removing or replacing the invalid component/version, including the corresponding alternate handling around the additional affected block, or remove the retry wording and consistently treat these cases as failures. Keep failure details and available-value suggestions accurate for the chosen behavior.
380-384: 🩺 Stability & Availability | 🟠 MajorSerialize interactive validation.
The skill requires all validations to run in parallel, but the same validation flow calls
prompt_user,confirm, and mutates issue objects. Parallel prompts can interleave across issues and produce nondeterministic results. Run read-only checks concurrently, then serialize prompts and mutations.Also applies to: 472-518
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 380 - 384, Update Phase 4 validation to separate read-only checks from interactive work: run independent read-only validations concurrently, then process each issue’s prompt_user, confirm, and issue-object mutations sequentially in a deterministic order. Aggregate every validation failure and block creation for each affected issue while preserving the existing reporting behavior.
70-84: 🎯 Functional Correctness | 🟠 MajorDo not classify every horizontal rule or H2 as a batch boundary.
>= 1separator still classifies a single issue containing a thematic---as batch. Once triggered, the plain-H2 splitter can also split content headings such as## Contextinto separate issues. Require actual issue blocks and use the same boundary predicate for detection and splitting.Also applies to: 205-242
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 70 - 84, Update the Detection Logic and plain-H2 splitting behavior so thematic horizontal rules and content-section H2 headings do not independently create batch issues. Require separators and headings to form actual issue blocks, and centralize the issue-boundary predicate so detection and splitting use identical rules. Preserve SINGLE ISSUE MODE unless valid issue boundaries are present.
828-832: 🔒 Security & Privacy | 🟠 MajorRedact raw exception details from failure output.
These paths interpolate raw exception text into warnings and failures. MCP/API exceptions may contain request data or secrets; return sanitized error categories to users and keep diagnostics internal.
Also applies to: 858-885, 931-939
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 828 - 832, Update the exception handling around the parent-link operation and the additional failure paths at the referenced locations to stop exposing raw exception text in user-facing warnings or failures. Replace interpolated exception details with a sanitized error category or generic message, while retaining the full exception only in internal diagnostics through the existing logging mechanism.
🤖 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/jira/skills/create-jira-from-file/SKILL.md`:
- Around line 698-705: Remove the pre-loop security-level lookup that calls
getJiraProjectIssueTypesMetadata(project_key) and conditionally sets
fields["security"], since project_key is undefined there. Keep the later
per-issue security handling that uses issue.project, or relocate this logic only
into a scope where the project key is defined.
- Around line 504-512: Update the “Auto-detection heuristics for type” section
to remove “or has parent specified” from the Sub-task rule. Infer Sub-task only
from explicit “sub-task:” text, preserving parent fields for association without
changing the detected type of Stories, Tasks, or Epics.
- Around line 258-283: Add a stable issue identifier to the Phase 2 issue schema
and ensure parsing assigns it before execution begins, or consistently replace
execution-state map keys with the documented batch index. Update all creation
and failure map accesses, including the flows around the referenced later
sections, so the same identifier is used throughout execution.
- Around line 102-117: Make the missing-project behavior consistent across the
metadata extraction rules and the documented edge-case flow: update the
extraction workflow so a missing **Project:** value reaches the documented
interactive prompt and continues, rather than failing immediately. Apply the
same behavior in the additional edge-case section around the corresponding flow,
or remove the conflicting prompt claim if prompting is not supported.
- Around line 834-856: Update the ComponentNotFoundError and
VersionNotFoundError handlers, plus the corresponding permission and
field-validation handlers around the referenced dependent block, to add each
failed issue’s identifier to failed_batch_ids before continuing. Ensure failure
marking occurs before any dependent-child evaluation so children of failed
in-batch parents are skipped consistently.
- Around line 676-685: Update the “Execution Order” section to create Outcomes
before Features and Initiatives, using separate ordered steps rather than
combining levels 2–3. Preserve document order within each level and retain the
existing ordering for Epics, Stories/Tasks/Bugs, and Sub-tasks.
- Around line 588-595: Normalize component metadata access in the validation
flow around getJiraProjectIssueTypesMetadata and its fallback handler: support
the actual MCP response shape consistently by extracting component names through
one shared representation or normalization step, then reuse those names for
validation and suggestions. Ensure both object- and dictionary-shaped component
entries are handled without type-dependent failures.
- Around line 816-827: Update the ParentLinkError fallback around
createJiraIssue so fields_without_parent is converted to the same scalar project
and issuetype contract used by the primary creation path before calling
createJiraIssue. Preserve removal of the parent field, then retry linking the
parent through editJiraIssue after successful creation.
- Around line 780-788: Update the target-version assignment in the issue
creation flow around find_version_id and customfield_10855 to use the
project-specific value shape: retain [{"id": version_id}] for CNTRLPLANE and
assign the version identifier as a plain string for OCPBUGS. Preserve the
existing metadata lookup and only set the field when a version ID is found.
---
Duplicate comments:
In `@plugins/jira/skills/create-jira-from-file/SKILL.md`:
- Around line 711-728: The convention detection block around
should_apply_conventions must remain project-agnostic: remove the hard-coded
projects_with_conventions and components_with_conventions allowlists, and
determine applicability using the jira:jira-conventions skill’s generic criteria
instead. Preserve invoking jira:jira-conventions and applying its returned
defaults when those criteria match.
- Around line 790-792: Update the parent-resolution logic surrounding the child
creation flow and its corresponding occurrence near the later parent assignment:
replace the undefined created_issues check with the resolved
source-reference-to-Jira-key mapping, ensuring validated pre-existing parents
and parents created in the current batch are both eligible. Use that same
mapping to populate fields["parent"] with the resolved Jira key.
- Around line 798-886: Remove the duplicate Jira creation loop and retain one
ordered handler chain centered on createJiraIssue, including the specific
exception handlers before the generic fallback. Initialize successes, failures,
warnings, created_jira_keys, jira_key_to_issue_id, and failed_batch_ids before
that loop begins, then ensure the single loop owns all issue creation and result
tracking.
- Around line 834-856: Update the ComponentNotFoundError and
VersionNotFoundError handlers in the documented issue-creation flow to match the
promised retry behavior: implement a bounded retry after removing or replacing
the invalid component/version, including the corresponding alternate handling
around the additional affected block, or remove the retry wording and
consistently treat these cases as failures. Keep failure details and
available-value suggestions accurate for the chosen behavior.
- Around line 380-384: Update Phase 4 validation to separate read-only checks
from interactive work: run independent read-only validations concurrently, then
process each issue’s prompt_user, confirm, and issue-object mutations
sequentially in a deterministic order. Aggregate every validation failure and
block creation for each affected issue while preserving the existing reporting
behavior.
- Around line 70-84: Update the Detection Logic and plain-H2 splitting behavior
so thematic horizontal rules and content-section H2 headings do not
independently create batch issues. Require separators and headings to form
actual issue blocks, and centralize the issue-boundary predicate so detection
and splitting use identical rules. Preserve SINGLE ISSUE MODE unless valid issue
boundaries are present.
- Around line 828-832: Update the exception handling around the parent-link
operation and the additional failure paths at the referenced locations to stop
exposing raw exception text in user-facing warnings or failures. Replace
interpolated exception details with a sanitized error category or generic
message, while retaining the full exception only in internal diagnostics through
the existing logging mechanism.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: c8adcfb3-f8be-490c-ae1d-1c53881f0de4
📒 Files selected for processing (8)
.claude-plugin/marketplace.jsondocs/index.htmlplugins/jira/.claude-plugin/plugin.jsonplugins/jira/commands/create-jira-from-file.mdplugins/jira/examples/create-jira-from-file-batch.mdplugins/jira/examples/create-jira-from-file-single-story.mdplugins/jira/skills/create-jira-from-file/SKILL.mdplugins/jira/skills/create-jira-from-file/phase4-validate.md
🚧 Files skipped from review as they are similar to previous changes (7)
- plugins/jira/commands/create-jira-from-file.md
- .claude-plugin/marketplace.json
- plugins/jira/examples/create-jira-from-file-single-story.md
- plugins/jira/examples/create-jira-from-file-batch.md
- plugins/jira/skills/create-jira-from-file/phase4-validate.md
- plugins/jira/.claude-plugin/plugin.json
- docs/index.html
| ```python | ||
| project_meta = getJiraProjectIssueTypesMetadata(issue.project) | ||
| valid_components = [c.name for c in project_meta.components] | ||
|
|
||
| if issue.component not in valid_components: | ||
| warning(f"Component '{issue.component}' not found in project {issue.project}") | ||
| suggest_closest_match(issue.component, valid_components) # Fuzzy match | ||
| prompt_user("Options: (1) Use suggested component, (2) Remove component, (3) Manually specify") |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file='plugins/jira/skills/create-jira-from-file/SKILL.md'
# Show the two referenced regions with line numbers
sed -n '560,620p' "$file" | cat -n
printf '\n----\n'
sed -n '820,860p' "$file" | cat -n
# Search for all component metadata accesses in this skill
printf '\n==== component metadata references ====\n'
grep -nE 'project_meta\.components|c\[["'\'']name["'\'']\]|c\.name|component' "$file" | sed -n '1,200p'Repository: openshift-eng/ai-helpers
Length of output: 7352
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Find all references to the metadata helpers and component field shapes
rg -n "getJiraProjectIssueTypesMetadata|getJiraIssueTypeMetaWithFields|allowedValues|components" plugins/jira/skills/create-jira-from-file/SKILL.md
printf '\n---- helper references around documented response shape ----\n'
sed -n '1120,1235p' plugins/jira/skills/create-jira-from-file/SKILL.md | cat -n
printf '\n---- component creation / validation surrounding lines ----\n'
sed -n '760,850p' plugins/jira/skills/create-jira-from-file/SKILL.md | cat -nRepository: openshift-eng/ai-helpers
Length of output: 10181
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Locate the helper implementation or any schema docs
fd -a 'getJiraProjectIssueTypesMetadata' .
printf '\n----\n'
rg -n "def getJiraProjectIssueTypesMetadata|function getJiraProjectIssueTypesMetadata|getJiraProjectIssueTypesMetadata\s*\(" .
printf '\n----\n'
rg -n "\"components\"|securityLevels|allowedValues|hierarchyLevel" plugins . | sed -n '1,240p'Repository: openshift-eng/ai-helpers
Length of output: 19678
Normalize Jira component metadata access. project_meta.components is treated as objects here (c.name) but as dicts in the fallback handler (c["name"]); one of the paths will fail depending on the MCP response shape.
🧰 Tools
🪛 SkillSpector (2.3.11)
[error] 399: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
(Privilege Escalation (PE3))
🤖 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/jira/skills/create-jira-from-file/SKILL.md` around lines 588 - 595,
Normalize component metadata access in the validation flow around
getJiraProjectIssueTypesMetadata and its fallback handler: support the actual
MCP response shape consistently by extracting component names through one shared
representation or normalization step, then reuse those names for validation and
suggestions. Ensure both object- and dictionary-shaped component entries are
handled without type-dependent failures.
e045a96 to
661e5f3
Compare
|
Hi @vthapar — welcome! I've been building Jira automation skills in a similar space (a meeting-notes-to-Jira workflow that does file ingestion → plan → execute), so I wanted to share some observations. The core idea of file-based batch creation is genuinely useful. Two things I'd flag: The overlap check failure The CI check flagged ~86.5% similarity with the existing The "project-agnostic" claim vs. what the skill does The PR description says project-agnostic, but the skill hard-codes Red Hat conventions — specific project/component allowlists and Happy to discuss the design — the workflow phases you've built are solid, it's mainly a question of where the code lives and how it relates to what's already there. |
Project-agnostic skill that creates Jira issues from markdown files. Supports single-issue and batch modes with comprehensive validation. Features: - Markdown file ingestion with metadata extraction (**Bold:** patterns) - Batch mode detection (type-prefixed H2s, separators) - Model-optimized phases (lighter for ingest/plan, stronger for validate/execute) - Security credential scanning (AWS, GCP, Azure, API tokens, SSH keys) - Parent hierarchy validation with execution ordering - Component/version validation with retry fallback - Batch processing with partial failure handling and dependency skipping - Content section mapping (Description, AC, Steps to Reproduce, etc.) Refactoring: - Extract shared validation/execution logic to plugins/jira/skills/_shared/ - validation-common.md: security scanning, summary validation, parent hierarchy - execution-common.md: universal defaults, field ID resolution, MCP error handlers - Update jira:create skill to use shared validation/execution patterns - Reduces duplication: 323 lines removed, maintains separate workflows Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
661e5f3 to
3df5578
Compare
|
I did a follow-up pass on this with Claude and it surfaced a few additional technical issues worth flagging: Schema field name mismatch (critical): Phase 2 outputs Silent Task default: Phase 2 appears to default missing type to
Failure records expose full content: These are in addition to what CodeRabbit flagged. The parallel interactive validation issue CodeRabbit raised (#4 in their second review) still looks open too — worth confirming whether that was addressed. |
Project-agnostic skill that creates Jira issues from markdown files. Supports single-issue and batch modes with comprehensive validation.
Features:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes
This is to support a use case where one can create Jira issues with an input file [markdown for now] to create single or multiple Jira issues. The input file can be create through any external source - manually, slack conversations, Meet transcripts etc.
Special notes for your reviewer:
This is my first time contributing to
ai-helpers. I considered updatingcreate-jiraskill to add option for file, but this approach seemed better to me. Initially I had started working on this skill with goal to push to Submariner repo but discussion in slack made me realize it could be useful to wider OCP community.While co-auth mentions Sonnet this was created with a workflow similar to one in this PR by different models used for different phases for optimal efficiency.
Checklist:
Summary by CodeRabbit
create-jira-from-fileto create one or more Jira issues from a structured Markdown file (single or batch), including preview/edit flow, validation, parent linking, and summarized results (with partial success handling for non-security errors).create-jira-from-file, including Phase 4 security-critical validation and required metadata behavior.