Skip to content

Conversation

@vikram-raj
Copy link
Member

Claude slash command to generate a commit message and PR description after analyzing the changes using git diff

@openshift-ci openshift-ci bot requested review from jhadvig and rhamilto January 5, 2026 10:34
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 5, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vikram-raj
Once this PR has been reviewed and has the lgtm label, please assign therealjon for approval. For more information see the Code Review Process.

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

Details 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

@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

Walkthrough

Adds a new Markdown file at .claude/commands/pr-desc-claude.md providing guidelines to generate Conventional Commits–style commit messages (subject ≤ 50 characters) and a structured pull request description template with Overview, Changes, and Testing sections.

Changes

Cohort / File(s) Summary
Documentation
​.claude/commands/pr-desc-claude.md
New file added containing rules to produce Conventional Commits-style commit messages (subject ≤ 50 chars) and a PR description template with Overview, Changes, and Testing sections, including an example.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 34f2358 and 026ae1d.

📒 Files selected for processing (1)
  • .claude/commands/pr-desc-claude.md
✅ Files skipped from review due to trivial changes (1)
  • .claude/commands/pr-desc-claude.md

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
.claude/commands/pr-desc-claude.md (2)

1-4: Consider expanding commit message guidance to include body format.

The instructions mention the subject line requirement but omit guidance on the commit body/description, which is part of the Conventional Commits specification. Adding a brief mention of body formatting (e.g., wrapped at ~72 characters, separated from subject by a blank line) would make the instructions more complete and aligned with Conventional Commits best practices.

🔎 Suggested enhancement
 ### For Commit Messages (Conventional Commits style)
 
-1. Analyze this `git diff` and write a commit message following the Conventional Commits specification (e.g., feat:, fix:). Keep the subject line under 50 characters.
+1. Analyze this `git diff` and write a commit message following the Conventional Commits specification (e.g., feat:, fix:). 
+   - Subject line: Under 50 characters, imperative mood.
+   - Body (if needed): Wrapped at ~72 characters, separated from subject by a blank line. Explain *why* the change was made, not just what.

5-10: Add examples to illustrate the expected output.

The PR description template is clear in structure but could benefit from concrete examples or more detailed guidance on what each section should contain. For instance, the "Testing" section guidance ("how these changes can be verified") is quite general—examples of unit tests, integration tests, manual verification steps, etc. would help clarify expectations.

🔎 Suggested enhancement
 ### For Pull Request Descriptions
 
 1. Analyze git diff and write a PR description. Use the following format:
    - Overview: High-level summary of the goal.
    - Changes: Bulleted list of specific technical modifications.
-   - Testing: How these changes can be verified.
+   - Testing: How these changes can be verified (e.g., unit tests added, manual verification steps, integration test coverage).
+
+ Example:
+ **Overview:** Adds support for parallel widget rendering to improve dashboard load times.
+ **Changes:**
+   - Refactored `WidgetRenderer` to use concurrent workers
+   - Added caching layer for widget metadata
+   - Updated tests to validate concurrent execution
+ **Testing:** Run `npm test` to verify new concurrency tests. Manual verification: load dashboard with 50+ widgets; confirm render time < 2s.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 24830e3 and df2125f.

📒 Files selected for processing (1)
  • .claude/commands/pr-desc-claude.md

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.claude/commands/pr-desc-claude.md (1)

14-19: Fix formatting of the Testing section in the example.

The **Testing:** section should be separated from the Changes list with a blank line and positioned at the root indentation level (consistent with **Changes:**) rather than indented within the Changes block. This improves readability and ensures the example accurately reflects the intended structure.

🔎 Proposed formatting fix
  **Changes:**
  
  - Refactored `WidgetRenderer` to use concurrent workers
  - Added caching layer for widget metadata
  - Updated tests to validate concurrent execution
  
- **Testing:** Run `npm test` to verify new concurrency tests. Manual verification: load dashboard with 50+ widgets; confirm render time < 2s.
+ **Testing:** Run `npm test` to verify new concurrency tests. Manual verification: load dashboard with 50+ widgets; confirm render time < 2s.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between df2125f and 34f2358.

📒 Files selected for processing (1)
  • .claude/commands/pr-desc-claude.md
🔇 Additional comments (1)
.claude/commands/pr-desc-claude.md (1)

1-11: Guidelines are clear and well-structured.

The Conventional Commits guidance (with examples) and the PR description format (Overview, Changes, Testing) provide Claude with actionable structure. The format is practical and aligns with industry standards for clear, descriptive commits and PRs.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 6, 2026

@vikram-raj: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-images 026ae1d link true /test okd-scos-images

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vikram-raj 👍
I would suggest to also add JIRA Auto-detection, by automatically extracting JIRA ticket IDs from branch names matching CONSOLE- or OCPBUGS- patterns.
Check "JIRA Auto-detection" section in https://github.com/openshift/console-operator/pull/1064/changes

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants