-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add a PR-Comment Skill #33585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
kubaflo
wants to merge
19
commits into
dotnet:main
Choose a base branch
from
kubaflo:pr-comment-skill
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add a PR-Comment Skill #33585
+1,000
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ture Key improvements: - Check if phase comment exists BEFORE posting (prevents duplicates) - Extract actual content from state file sections instead of simplified summaries - Match state file structure with collapsible <details> sections - Include full tables (Files Changed, Fix Candidates with all columns) - No update mode - each phase gets ONE comment only - Better duplicate detection during recursive calls Fixes issues: - Duplicate Tests comment posted on PR dotnet#27932 - Comments didn't match state file structure (missing subsections) - Fix Candidates table missing columns (Source, Approach, Test Result, etc.)
- Comments now store extracted state file content internally - No references to state files (which may be deleted) - Nested <details> structure preserves all sections - When state file is deleted, comments remain complete - Supports appending new Review Sessions with full content
- Pre-flight: Keeps nested <details> for 3 subsections (Issue/Files/Discussion) - Other phases: Content directly in Review Session (no extra nesting) - Added spacing after Review Session header for better visual appeal - Cleaner, more readable comments for single-content phases
- Phase headers: Use em dash (—) instead of colon - Status values: Bold formatting (**SUCCESS**, **FAILED**, etc.) - Add horizontal rules (---) after headers and session summaries - Consistent spacing throughout all phases - Professional, polished appearance for PR comments
- Fetch both commit message and SHA from GitHub API - Create markdown link: [Commit Title](commit URL) - Users can click to view the commit that triggered the review - Better traceability for multiple review sessions on same PR
Format: 📝 **Review Session 1** — **Commit Title** · [`abc1234`](commit-url) - Bold 'Review Session N' - Bold commit title - Middle dot separator (·) - Short SHA in code formatting - SHA is clickable link to full commit - Clean, professional appearance
<summary> tags don't support markdown syntax, so use raw HTML: - <strong> for bold text - <a href="..."><code>SHA</code></a> for clickable code-formatted link - Ensures proper rendering in GitHub PR comments Format: 📝 <strong>Review Session 1</strong> — <strong>Title</strong> · <a href="..."><code>abc1234</code></a>
Key Changes: - StateFile parameter now OPTIONAL (not mandatory) - Added Content parameter for direct content posting - Comments are self-contained - state file only needed at POST time - Once posted, comments can be updated without state file - Supports both modes: extract from state file OR post direct content Benefits: - State files can be deleted after review without breaking comments - Comments remain complete and readable independently - More flexible usage patterns (manual updates, automated workflows) - No hard dependency on state file persistence
Complete refactoring to make skill truly self-contained: - Removed StateFile parameter entirely - Content parameter now mandatory (single source of truth) - No knowledge of where content comes from - No external file dependencies - Script only cares about: PR number, phase, content - Caller decides where content comes from (agent extracts, manual input, etc.) Documentation updated: - Removed all mentions of external sources - Simplified to: just pass content - No coupling to any particular workflow or file structure Benefits: - Pure function: inputs → output - No hidden dependencies - Works in any context - Easy to understand and maintain
Visual improvements for better GitHub rendering: Changes: - Replaced horizontal rules (---) with <br> tags after headers - Added <br> spacing between nested sections in Pre-Flight - Added <br> spacing after Review Session summary in all phases - Added <br> inside nested <details> for breathing room - Consistent spacing between all content blocks Result: - Cleaner, more professional appearance - Better visual hierarchy - Improved readability on GitHub - Less cramped layout
Simplify comment format by removing session numbers: - Removed reviewNumber variable and counting logic - Changed header from 'Review Session 1' to just 'Review Session' - Session still expandable with commit link, just no sequential numbering Rationale: - Session numbering adds complexity without clear value - Commit links already provide traceability - Cleaner, simpler format for users
…ture - Replace <br> with --- after phase headers - Add --- after Review Session summary tags - Improves visual separation between sections - Makes comments more readable and structured
- Add --- separator when appending new sessions to existing comments - Fix recursive call to use -Content instead of removed -StateFile parameter - Improves visual distinction between multiple review sessions - Makes review history clearer and easier to follow
- Posts ONE comment for entire review (not 5 separate comments) - Minimal vertical space when collapsed - All 5 phases in expandable sections - Updates existing comment as phases complete - Simpler parameter: just Content (no Phase parameter)
- Better regex for phase status table parsing - Handles various table formats correctly - Add state file for PR dotnet#27932 review session
12fe5a3 to
7926fd5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.