Skip to content

feat(miners): aggregate PR/issue discussion summary (#97)#113

Open
jeffrey701 wants to merge 1 commit into
entrius:testfrom
jeffrey701:feat/miners-discussion-summary-97
Open

feat(miners): aggregate PR/issue discussion summary (#97)#113
jeffrey701 wants to merge 1 commit into
entrius:testfrom
jeffrey701:feat/miners-discussion-summary-97

Conversation

@jeffrey701
Copy link
Copy Markdown

Summary

Adds three SQL views and projects a discussion_summary field on each PR / issue row returned by the miners API:

  • pr_discussion_summary — conversation-thread comments per PR
  • pr_review_comment_summary — inline review-comments per PR
  • issue_discussion_summary — conversation-thread comments per issue

MinersService LEFT JOINs the three views and projects per row: conversation_comment_count, conversation_unique_authors, maintainer_conversation_comments, review_comment_count (PRs only), review_comment_unique_authors (PRs only), author_self_reply_share (0–1, 4-decimal rounded), and last_activity_at (GREATEST across both comment surfaces for PRs).

Issues intentionally have no review_comment_* fields — issues have no inline-review surface.

Related Issues

Closes #97

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

  • Verified column names against packages/db/05_comments.sql, 06_review_comments.sql, 02_pull_requests.sql, 03_issues.sql.
  • View style mirrors existing 21_view_pr_review_summary.sql.
  • Views use CREATE OR REPLACE VIEW — re-run-safe.

Checklist

  • I have read the Contributing Guide
  • Code builds without errors
  • New and existing tests pass (if applicable)
  • Documentation updated (if applicable)
  • No unnecessary dependencies added

Add three SQL views that aggregate comment + review-comment activity per
PR and per issue, and project a single `discussion_summary` field on
each miners API row:

- pr_discussion_summary       (conversation comments on PRs)
- pr_review_comment_summary   (inline review-comments on PRs)
- issue_discussion_summary    (conversation comments on issues)

PR responses now include conversation totals, maintainer-comment count,
review-comment totals, author-self-reply share and last-activity-at.
Issue responses include the same shape minus review-comment fields
(issues have no inline-review surface).

Closes entrius#97
@xiao-xiao-mao xiao-xiao-mao Bot added the enhancement New feature or request label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comment / discussion aggregation in the miners API

1 participant