Skip to content

Conversation

@bryan-cox
Copy link
Contributor

@bryan-cox bryan-cox commented Oct 30, 2025

What this PR does / why we need it:

This PR adds a new /jira:create-release-note command to automatically generate bug fix release notes by analyzing Jira bug tickets and their linked GitHub pull requests.

Bug fix release notes require extracting information from multiple sources (Jira ticket fields and GitHub PR analysis). This command automates the process by:

  • Extracting Cause and Consequence from Jira bug descriptions
  • Analyzing all linked GitHub PRs (description, commits, code changes, comments)
  • Synthesizing the information into a cohesive release note
  • Validating content for security (no credentials)
  • Updating Jira ticket fields (Release Note Type and Release Note Text)

Key Features:

  • Multi-source analysis: Analyzes PRs, commits, diffs, and comments
  • Security validation: Scans for credentials before submission
  • Intelligent synthesis: Combines multiple PRs into coherent narrative
  • Error handling: Handles missing sections, inaccessible PRs, etc.
  • Man-page documentation: Follows repository conventions

Files Added:

  • plugins/jira/commands/create-release-note.md - Command definition with comprehensive documentation
  • plugins/jira/skills/create-release-note/SKILL.md - Detailed implementation guidance

Files Modified:

  • plugins/jira/README.md - Added command documentation
  • PLUGINS.md - Generated plugin list (via make update)
  • docs/data.json - Generated website data (via make update)

Example Usage:

/jira:create-release-note OCPBUGS-38358

The command will:

  1. Fetch the bug from Jira
  2. Extract Cause and Consequence from description
  3. Find and analyze all linked GitHub PRs
  4. Generate release note
  5. Prompt for Release Note Type selection
  6. Update Jira ticket fields
  7. Display results

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-1773

Special notes for your reviewer:

  • All linting checks pass (make lint ✓)
  • Follows man-page documentation format consistent with other commands
  • Security validation prevents credentials from being included in release notes
  • Comprehensive error handling for common scenarios (missing PRs, inaccessible PRs, missing sections, etc.)
  • Uses MCP Jira tools and GitHub CLI (gh) for data retrieval

Prerequisites for testing:

  • MCP Jira server configured
  • GitHub CLI (gh) installed and authenticated
  • Access to linked GitHub repositories
  • Jira permissions to update Release Note fields

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.

🤖 Generated with Claude Code via /jira:solve [CNTRLPLANE-1773](https://issues.redhat.com//browse/CNTRLPLANE-1773)

Co-Authored-By: Claude [email protected]

bryan-cox and others added 4 commits October 30, 2025 14:16
Add new command to automatically generate bug fix release notes by analyzing Jira bugs and their linked GitHub PRs. The command extracts Cause and Consequence from the bug description, analyzes PR content, and updates the Jira ticket with a synthesized release note.

This automation saves time and ensures consistent release note quality across all bugs by analyzing multiple sources: PR descriptions, commit messages, code changes, and PR comments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add detailed implementation skill providing step-by-step guidance for generating release notes. The skill covers:
- Parsing bug descriptions for Cause/Consequence
- Extracting and analyzing GitHub PRs
- Synthesizing information into cohesive release notes
- Security validation and error handling

This skill ensures consistent, high-quality implementation of the create-release-note command.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add documentation for the new create-release-note command to the Jira plugin README. Includes usage examples, prerequisites, and sample output.

This helps users understand how to use the new release note generation feature.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Update PLUGINS.md and docs/data.json to reflect the new create-release-note command.

Generated files are kept in sync with plugin metadata to ensure accurate documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 30, 2025
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 30, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 30, 2025

@bryan-cox: This pull request references CNTRLPLANE-1773 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 task to target the "4.21.0" version, but no target version was set.

In response to this:

Summary

This PR adds a new /jira:create-release-note command to automatically generate bug fix release notes by analyzing Jira bug tickets and their linked GitHub pull requests.

What this PR does / why we need it

Bug fix release notes require extracting information from multiple sources (Jira ticket fields and GitHub PR analysis). This command automates the process by:

  • Extracting Cause and Consequence from Jira bug descriptions
  • Analyzing all linked GitHub PRs (description, commits, code changes, comments)
  • Synthesizing the information into a cohesive release note
  • Validating content for security (no credentials)
  • Updating Jira ticket fields (Release Note Type and Release Note Text)

Key Features

  • Multi-source analysis: Analyzes PRs, commits, diffs, and comments
  • Security validation: Scans for credentials before submission
  • Intelligent synthesis: Combines multiple PRs into coherent narrative
  • Error handling: Handles missing sections, inaccessible PRs, etc.
  • Man-page documentation: Follows repository conventions

Files Added/Modified

New Files

  • plugins/jira/commands/create-release-note.md - Command definition with comprehensive documentation
  • plugins/jira/skills/create-release-note/SKILL.md - Detailed implementation guidance

Modified Files

  • plugins/jira/README.md - Added command documentation
  • PLUGINS.md - Generated plugin list (via make update)
  • docs/data.json - Generated website data (via make update)

Testing

All linting checks pass:

make lint
✓ All checks passed!

Example Usage

/jira:create-release-note OCPBUGS-38358

The command will:

  1. Fetch the bug from Jira
  2. Extract Cause and Consequence from description
  3. Find and analyze all linked GitHub PRs
  4. Generate release note
  5. Prompt for Release Note Type selection
  6. Update Jira ticket fields
  7. Display results

Release Note Format

Cause: <extracted from bug description>
Consequence: <extracted from bug description>
Fix: <analyzed from PRs>
Result: <analyzed from PRs>
Workaround: <analyzed from PRs if applicable>

Prerequisites

  • MCP Jira server configured
  • GitHub CLI (gh) installed and authenticated
  • Access to linked GitHub repositories
  • Jira permissions to update Release Note fields

Addresses

🤖 Generated with Claude Code via /jira:solve [CNTRLPLANE-1773](https://issues.redhat.com//browse/CNTRLPLANE-1773)

Co-Authored-By: Claude [email protected]

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.

@openshift-ci
Copy link

openshift-ci bot commented Oct 30, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link

openshift-ci bot commented Oct 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 30, 2025

@bryan-cox: This pull request references CNTRLPLANE-1773 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 task to target the "4.21.0" version, but no target version was set.

In response to this:

Summary

This PR adds a new /jira:create-release-note command to automatically generate bug fix release notes by analyzing Jira bug tickets and their linked GitHub pull requests.

What this PR does / why we need it

Bug fix release notes require extracting information from multiple sources (Jira ticket fields and GitHub PR analysis). This command automates the process by:

  • Extracting Cause and Consequence from Jira bug descriptions
  • Analyzing all linked GitHub PRs (description, commits, code changes, comments)
  • Synthesizing the information into a cohesive release note
  • Validating content for security (no credentials)
  • Updating Jira ticket fields (Release Note Type and Release Note Text)

Key Features

  • Multi-source analysis: Analyzes PRs, commits, diffs, and comments
  • Security validation: Scans for credentials before submission
  • Intelligent synthesis: Combines multiple PRs into coherent narrative
  • Error handling: Handles missing sections, inaccessible PRs, etc.
  • Man-page documentation: Follows repository conventions

Files Added/Modified

New Files

  • plugins/jira/commands/create-release-note.md - Command definition with comprehensive documentation
  • plugins/jira/skills/create-release-note/SKILL.md - Detailed implementation guidance

Modified Files

  • plugins/jira/README.md - Added command documentation
  • PLUGINS.md - Generated plugin list (via make update)
  • docs/data.json - Generated website data (via make update)

Testing

All linting checks pass:

make lint
✓ All checks passed!

Example Usage

/jira:create-release-note OCPBUGS-38358

The command will:

  1. Fetch the bug from Jira
  2. Extract Cause and Consequence from description
  3. Find and analyze all linked GitHub PRs
  4. Generate release note
  5. Prompt for Release Note Type selection
  6. Update Jira ticket fields
  7. Display results

Release Note Format

Cause: <extracted from bug description>
Consequence: <extracted from bug description>
Fix: <analyzed from PRs>
Result: <analyzed from PRs>
Workaround: <analyzed from PRs if applicable>

Prerequisites

  • MCP Jira server configured
  • GitHub CLI (gh) installed and authenticated
  • Access to linked GitHub repositories
  • Jira permissions to update Release Note fields

Addresses

🤖 Generated with Claude Code via /jira:solve [CNTRLPLANE-1773](https://issues.redhat.com//browse/CNTRLPLANE-1773)

Co-Authored-By: Claude [email protected]

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.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 30, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 30, 2025

@bryan-cox: This pull request references CNTRLPLANE-1773 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 task to target the "4.21.0" version, but no target version was set.

In response to this:

What this PR does / why we need it:

This PR adds a new /jira:create-release-note command to automatically generate bug fix release notes by analyzing Jira bug tickets and their linked GitHub pull requests.

Bug fix release notes require extracting information from multiple sources (Jira ticket fields and GitHub PR analysis). This command automates the process by:

  • Extracting Cause and Consequence from Jira bug descriptions
  • Analyzing all linked GitHub PRs (description, commits, code changes, comments)
  • Synthesizing the information into a cohesive release note
  • Validating content for security (no credentials)
  • Updating Jira ticket fields (Release Note Type and Release Note Text)

Key Features:

  • Multi-source analysis: Analyzes PRs, commits, diffs, and comments
  • Security validation: Scans for credentials before submission
  • Intelligent synthesis: Combines multiple PRs into coherent narrative
  • Error handling: Handles missing sections, inaccessible PRs, etc.
  • Man-page documentation: Follows repository conventions

Files Added:

  • plugins/jira/commands/create-release-note.md - Command definition with comprehensive documentation
  • plugins/jira/skills/create-release-note/SKILL.md - Detailed implementation guidance

Files Modified:

  • plugins/jira/README.md - Added command documentation
  • PLUGINS.md - Generated plugin list (via make update)
  • docs/data.json - Generated website data (via make update)

Example Usage:

/jira:create-release-note OCPBUGS-38358

The command will:

  1. Fetch the bug from Jira
  2. Extract Cause and Consequence from description
  3. Find and analyze all linked GitHub PRs
  4. Generate release note
  5. Prompt for Release Note Type selection
  6. Update Jira ticket fields
  7. Display results

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-1773

Special notes for your reviewer:

  • All linting checks pass (make lint ✓)
  • Follows man-page documentation format consistent with other commands
  • Security validation prevents credentials from being included in release notes
  • Comprehensive error handling for common scenarios (missing PRs, inaccessible PRs, missing sections, etc.)
  • Uses MCP Jira tools and GitHub CLI (gh) for data retrieval

Prerequisites for testing:

  • MCP Jira server configured
  • GitHub CLI (gh) installed and authenticated
  • Access to linked GitHub repositories
  • Jira permissions to update Release Note fields

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.

🤖 Generated with Claude Code via /jira:solve [CNTRLPLANE-1773](https://issues.redhat.com//browse/CNTRLPLANE-1773)

Co-Authored-By: Claude [email protected]

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.

1 similar comment
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 30, 2025

@bryan-cox: This pull request references CNTRLPLANE-1773 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 task to target the "4.21.0" version, but no target version was set.

In response to this:

What this PR does / why we need it:

This PR adds a new /jira:create-release-note command to automatically generate bug fix release notes by analyzing Jira bug tickets and their linked GitHub pull requests.

Bug fix release notes require extracting information from multiple sources (Jira ticket fields and GitHub PR analysis). This command automates the process by:

  • Extracting Cause and Consequence from Jira bug descriptions
  • Analyzing all linked GitHub PRs (description, commits, code changes, comments)
  • Synthesizing the information into a cohesive release note
  • Validating content for security (no credentials)
  • Updating Jira ticket fields (Release Note Type and Release Note Text)

Key Features:

  • Multi-source analysis: Analyzes PRs, commits, diffs, and comments
  • Security validation: Scans for credentials before submission
  • Intelligent synthesis: Combines multiple PRs into coherent narrative
  • Error handling: Handles missing sections, inaccessible PRs, etc.
  • Man-page documentation: Follows repository conventions

Files Added:

  • plugins/jira/commands/create-release-note.md - Command definition with comprehensive documentation
  • plugins/jira/skills/create-release-note/SKILL.md - Detailed implementation guidance

Files Modified:

  • plugins/jira/README.md - Added command documentation
  • PLUGINS.md - Generated plugin list (via make update)
  • docs/data.json - Generated website data (via make update)

Example Usage:

/jira:create-release-note OCPBUGS-38358

The command will:

  1. Fetch the bug from Jira
  2. Extract Cause and Consequence from description
  3. Find and analyze all linked GitHub PRs
  4. Generate release note
  5. Prompt for Release Note Type selection
  6. Update Jira ticket fields
  7. Display results

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-1773

Special notes for your reviewer:

  • All linting checks pass (make lint ✓)
  • Follows man-page documentation format consistent with other commands
  • Security validation prevents credentials from being included in release notes
  • Comprehensive error handling for common scenarios (missing PRs, inaccessible PRs, missing sections, etc.)
  • Uses MCP Jira tools and GitHub CLI (gh) for data retrieval

Prerequisites for testing:

  • MCP Jira server configured
  • GitHub CLI (gh) installed and authenticated
  • Access to linked GitHub repositories
  • Jira permissions to update Release Note fields

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.

🤖 Generated with Claude Code via /jira:solve [CNTRLPLANE-1773](https://issues.redhat.com//browse/CNTRLPLANE-1773)

Co-Authored-By: Claude [email protected]

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.

@bryan-cox
Copy link
Contributor Author

@bryan-cox bryan-cox marked this pull request as ready for review October 30, 2025 18:46
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 30, 2025
@stbenjam
Copy link
Member

Hm, when it went to github it assumed the jira key was github issue:

⏺ Bash(gh issue view OCPBUGS-54412 --repo openshift/origin --json body,comments 2>&1 || echo "Not a GitHub issue")
  ⎿  invalid issue format: "OCPBUGS-54412"
     Not a GitHub issue

Perhaps it can be coached a little better on now to find the linked PR's from the jira ticket?

I used https://issues.redhat.com/browse/OCPBUGS-54412 -- which has a linked PR in the bug itself.

But otherwise I like the output it eventually produced once it found the PR (it resorted to using gh to search for a PR)

Address feedback from @stbenjam to improve GitHub PR discovery logic:

- Add explicit warnings against using `gh issue view` with Jira keys
- Prioritize searching Jira remote links first (primary source)
- Add fallback search using `gh pr list --search` for common repos
- Provide user confirmation workflow for found PRs
- Update both command and skill documentation with clear examples

This prevents the error where the command tried to use Jira keys as GitHub issue numbers, which fails because they are different identifiers.

Fixes: openshift-eng#99 (comment)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@bryan-cox
Copy link
Contributor Author

@stbenjam Thanks for testing and the feedback!

I've updated the PR discovery logic to address the gh issue view error. The changes include:

  • Prioritize Jira remote links as the primary source for PR URLs
  • Add explicit warnings in documentation against using gh issue view with Jira keys
  • Implement fallback search using gh pr list --search "{issue-key}" for common OpenShift repos (hypershift, cluster-api-provider-*, origin)
  • Add user confirmation workflow when PRs are found via search

The command now correctly extracts PR URLs from Jira's web links first, and only falls back to searching if no links are found. This prevents the confusion between Jira keys and GitHub issue numbers.

Updated files:

  • plugins/jira/commands/create-release-note.md - Phase 2 documentation
  • plugins/jira/skills/create-release-note/SKILL.md - Step 3 implementation details

AI-assisted response via Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants