Skip to content

feat(coreping): group PR list by author#186

Open
snomiao wants to merge 1 commit intomainfrom
sno-coreping-groupby-author
Open

feat(coreping): group PR list by author#186
snomiao wants to merge 1 commit intomainfrom
sno-coreping-groupby-author

Conversation

@snomiao
Copy link
Copy Markdown
Member

@snomiao snomiao commented Apr 1, 2026

Summary

  • Groups CorePing Slack notification PRs by author (bold *@author*: heading) instead of a flat list
  • PRs sorted by age (oldest first) within each author group
  • Author groups ordered by their oldest PR's age

Before:

- @author1: PR-A is COMMITTED for 131 days
- @author2: PR-B is REVIEW_REQUESTED for 119 days
- @author1: PR-C is COMMITTED for 118 days

After:

*@author1*:
  - PR-A is COMMITTED for 131 days
  - PR-C is COMMITTED for 118 days
*@author2*:
  - PR-B is REVIEW_REQUESTED for 119 days

Test plan

  • Verify Bun compiles cleanly (bun build --no-bundle app/tasks/coreping/coreping.ts)
  • Run coreping task and confirm Slack message renders grouped by author

🤖 Generated with Claude Code

Group PRs by author (bold heading) instead of a flat list, with PRs
sorted by age within each group and author groups ordered by oldest PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comfy-pr Ready Ready Preview, Comment Apr 1, 2026 2:13am

Request Review

Copy link
Copy Markdown
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 updates the CorePing Slack notification formatting so Core/Important PRs are grouped by PR author instead of being displayed as a single flat list, improving readability and helping reviewers prioritize by author and age.

Changes:

  • Added logic to group PRs by author, sort PRs within each group by statusAt (oldest first), and order groups by their oldest PR.
  • Updated Slack message rendering to output grouped sections with *@author*: headers for both “pending review” and “keep in mind” lists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 466 to +468
? `Congratulations! All Core/Important PRs are reviewed! 🎉🎉🎉`
: `Hey <@comfy>, Here's x${pendingReviewCorePRs.length} Core/Important PRs waiting your feedback!
- ${pendingReviewCorePRs.map((pr) => `@${pr.author}: <${pr.url}|${pr.title}> (${pr.labels}) is ${pr.status} ${forDuration(pr.statusAt)}`).join("\n- ")}`;
${formatGroupedPRs(groupByAuthor(pendingReviewCorePRs), (pr) => `<${pr.url}|${pr.title}> (${pr.labels}) is ${pr.status} ${forDuration(pr.statusAt)}`)}`;
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The template literal adds a leading space before the grouped PR output (there’s a literal space after the newline before ${formatGroupedPRs(...)}). This will indent the first *@author*: line in Slack and can subtly affect formatting; consider removing the leading whitespace (e.g., put the interpolation immediately after the newline or trim the inserted block).

Copilot uses AI. Check for mistakes.

const keepInMindMessage =
remainingOpeningCorePRs.length > 0
? `\n\nAdditionally, there ${remainingOpeningCorePRs.length === 1 ? "is" : "are"} ${remainingOpeningCorePRs.length} other open Core/Important ${remainingOpeningCorePRs.length === 1 ? "PR" : "PRs"} that ${remainingOpeningCorePRs.length === 1 ? "is" : "are"} pending for author's change/update, lets wait for them.
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The "Additionally..." message has the same leading-whitespace issue: there is a literal space after the newline before the grouped PR output, which will indent the first *@author*: line in Slack. Also, the sentence uses "lets wait" (should be "let's wait").

Suggested change
? `\n\nAdditionally, there ${remainingOpeningCorePRs.length === 1 ? "is" : "are"} ${remainingOpeningCorePRs.length} other open Core/Important ${remainingOpeningCorePRs.length === 1 ? "PR" : "PRs"} that ${remainingOpeningCorePRs.length === 1 ? "is" : "are"} pending for author's change/update, lets wait for them.
? `\n\nAdditionally, there ${remainingOpeningCorePRs.length === 1 ? "is" : "are"} ${remainingOpeningCorePRs.length} other open Core/Important ${remainingOpeningCorePRs.length === 1 ? "PR" : "PRs"} that ${remainingOpeningCorePRs.length === 1 ? "is" : "are"} pending for author's change/update, let's wait for them.

Copilot uses AI. Check for mistakes.
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