Skip to content

Conversation

@kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Jan 29, 2026

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Refactors post-pr-finalize-comment.ps1 to produce a cleaner, more readable PR finalization comment format:

Before: Single collapsible section per review with merged Title/Description content
After: Two separate collapsible sections (Title and Description) for better scannability

Changes:

  • Replace per-review collapsible sections with dedicated Title and Description sections
  • Remove legacy ReviewNumber and ReviewDescription parameters (no longer needed)
  • Add TitleIssues parameter for direct title issue specification
  • Auto-detect TitleStatus from "Title Assessment" section in summary files
  • Always replace existing finalize comment instead of merging reviews
  • Broaden GitHub API comment fetch to ?per_page=100 to handle PRs with many comments
  • Simplify status defaulting logic

Issues Fixed

N/A - Internal tooling improvement

Copilot AI review requested due to automatic review settings January 29, 2026 11:23
@kubaflo
Copy link
Contributor Author

kubaflo commented Jan 29, 2026

📋 PR Finalization Review

Title: ✅ Good

Current: ai-summary-comment: Simplify PR finalize to two collapsible sections

Description: ✅ Excellent

The description is comprehensive and accurately reflects the implementation:

Before/After comparison clearly explains the structural change
All bullet points verified against diff:

  • Two separate collapsible sections (Title/Description) - confirmed
  • Removed ReviewNumber and ReviewDescription parameters - confirmed
  • Added TitleIssues parameter - confirmed
  • Auto-detect TitleStatus from summary files - confirmed
  • Always replace existing comment - confirmed
  • Broadened API to ?per_page=100 - confirmed
  • Simplified status defaulting logic - confirmed (removed $overallStatus calculation)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the PR finalization comment system to simplify the format and logic. Previously, the script maintained multiple numbered reviews (Review 1, Review 2, etc.) by merging new reviews with existing content. Now it produces a single comment with two collapsible sections (Title and Description) that always replaces the entire comment on updates.

Changes:

  • Removed ReviewNumber and ReviewDescription parameters and related aggregation logic
  • Changed from accumulating multiple review sections to always replacing the entire comment
  • Restructured comment format with two top-level collapsible sections (Title and Description) instead of per-review collapsibles
  • Updated title status auto-detection to look for explicit "Status:" field in Title Assessment section with fallback to recommended title check
  • Increased GitHub API comment fetch limit from default (30) to 100 per page
  • Simplified examples and documentation to reflect new parameter set

@kubaflo kubaflo force-pushed the pr-finalize-comment-improvements branch from 41bcc0a to 71a9485 Compare January 29, 2026 11:28
@kubaflo kubaflo changed the title Refactor PR finalize comment format and logic [Agent] ai-summary-comment: Simplify PR finalize to two collapsible sections (Title/Description) Jan 29, 2026
@kubaflo kubaflo self-assigned this Jan 29, 2026
@kubaflo kubaflo added the area-ai-agents Copilot CLI agents, agent skills, AI-assisted development label Jan 29, 2026
@kubaflo kubaflo force-pushed the pr-finalize-comment-improvements branch from 71a9485 to 1ef5cfd Compare January 29, 2026 11:33
@kubaflo kubaflo changed the title [Agent] ai-summary-comment: Simplify PR finalize to two collapsible sections (Title/Description) ai-summary-comment: Simplify PR finalize to two collapsible sections (Title/Descriptio Jan 29, 2026
@kubaflo kubaflo changed the title ai-summary-comment: Simplify PR finalize to two collapsible sections (Title/Descriptio ai-summary-comment: Simplify PR finalize to two collapsible sections Jan 29, 2026
Refactor PR finalize comment format and logic

Restructure post-pr-finalize-comment.ps1 to produce a single PR finalize comment composed of two collapsible sections (Title and Description) instead of per-review collapsibles. Remove legacy ReviewNumber and ReviewDescription parameters and associated aggregation logic; TitleStatus is now auto-detected from a dedicated Title Assessment section fallback. Always replace the existing finalize comment (instead of merging/adding reviews) and build separate title/description sections with updated formatting for issues and recommendations. Also update docs/examples, broaden GH API comment fetch to ?per_page=100, and simplify defaulting behavior.

Add TitleIssues parameter to post-pr-finalize-comment.ps1

The script was missing a parameter to pass title issues directly when using
manual parameters (instead of loading from SummaryFile). This caused errors
when trying to specify title issues without a summary file.

- Add TitleIssues parameter documentation
- Add TitleIssues to param block
- Initialize $titleIssues from parameter when not loading from SummaryFile
@kubaflo kubaflo force-pushed the pr-finalize-comment-improvements branch from 1ef5cfd to 5ae55f6 Compare January 29, 2026 11:42
@PureWeen
Copy link
Member

Review Feedback

The script changes look good and work correctly! I tested with -DryRun and the new two-section format (Title + Description) is cleaner and more scannable.

Suggestion: Update SKILL.md

Lines 59-62 of .github/skills/ai-summary-comment/SKILL.md still describe the old multi-review behavior:

"Finalization reviews can happen multiple times (after each commit). Each review is numbered (Review 1, Review 2, etc.)"

Since this PR changes the behavior to always replace the comment with a single Title + Description structure, consider updating that section to reflect the new behavior, e.g.:

"If an existing finalize comment exists, it will be replaced with the updated Title and Description sections."

This could be done in this PR or as a follow-up.

@PureWeen PureWeen merged commit 62894e4 into dotnet:main Jan 29, 2026
2 of 3 checks passed
kubaflo added a commit to kubaflo/maui that referenced this pull request Feb 2, 2026
…otnet#33771)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Refactors `post-pr-finalize-comment.ps1` to produce a cleaner, more
readable PR finalization comment format:

**Before:** Single collapsible section per review with merged
Title/Description content
**After:** Two separate collapsible sections (Title and Description) for
better scannability

#### Changes:
- Replace per-review collapsible sections with dedicated Title and
Description sections
- Remove legacy `ReviewNumber` and `ReviewDescription` parameters (no
longer needed)
- Add `TitleIssues` parameter for direct title issue specification
- Auto-detect `TitleStatus` from "Title Assessment" section in summary
files
- Always replace existing finalize comment instead of merging reviews
- Broaden GitHub API comment fetch to `?per_page=100` to handle PRs with
many comments
- Simplify status defaulting logic

### Issues Fixed

N/A - Internal tooling improvement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-ai-agents Copilot CLI agents, agent skills, AI-assisted development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants