feat(miners): aggregate PR/issue discussion summary (#97)#113
Open
jeffrey701 wants to merge 1 commit into
Open
feat(miners): aggregate PR/issue discussion summary (#97)#113jeffrey701 wants to merge 1 commit into
jeffrey701 wants to merge 1 commit into
Conversation
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
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
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.
Summary
Adds three SQL views and projects a
discussion_summaryfield on each PR / issue row returned by the miners API:pr_discussion_summary— conversation-thread comments per PRpr_review_comment_summary— inline review-comments per PRissue_discussion_summary— conversation-thread comments per issueMinersServiceLEFT 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), andlast_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
Testing
packages/db/05_comments.sql,06_review_comments.sql,02_pull_requests.sql,03_issues.sql.21_view_pr_review_summary.sql.CREATE OR REPLACE VIEW— re-run-safe.Checklist