Description
The mirror ingests pull_request_review_comment webhook events into review_comments, but it drops GitHub's comment.author_association field.
GitHub pull request review comment objects include author_association, but the current mirror schema, entity, and handler only store:
- reviewer id
- reviewer login
- review id
- path/line/side/body
- timestamps
As a result, inline diff review comments cannot contribute maintainer/member role evidence to contributor_repo_roles.
This matters because pr_labels_by_actor and issue_labels_by_actor resolve label actor_association through contributor_repo_roles, and miner API responses expose that value.
Steps to Reproduce
- Process a
pull_request_review_comment.created webhook where payload.comment.author_association = 'MEMBER'.
- Ensure that actor has no other stored association evidence in the repo:
- no authored PR row
- no authored issue row
- no submitted review row
- no issue/PR thread comment row
- Process a label event where the same actor applies a label to a PR or issue.
- Query
pr_labels_by_actor or issue_labels_by_actor.
Expected Behavior
The inline review comment should preserve the actor's GitHub association, and label actor role resolution should be able to use it.
The label row should expose actor_association = 'MEMBER' or the equivalent GitHub association value.
Actual Behavior
review_comments stores no association field, so the actor has no usable role evidence from the inline review comment. The label row can return actor_association = null.
Environment
- OS: Any
- Runtime/Node version: Node 20
- Browser (if applicable): N/A
Additional Context
Affected code:
packages/das/src/webhook/handlers/review-comment.handler.ts
packages/das/src/entities/ReviewComment.entity.ts
packages/db/06_review_comments.sql
packages/db/20_view_contributor_repo_roles.sql
packages/db/24_view_pr_labels_by_actor.sql
packages/db/25_view_issue_labels_by_actor.sql
GitHub references:
This is distinct from #13/#14. That fix added submitted PR reviews and issue/PR thread comments as role evidence, but inline PR review comments remain excluded because their author_association is never stored.
Description
The mirror ingests
pull_request_review_commentwebhook events intoreview_comments, but it drops GitHub'scomment.author_associationfield.GitHub pull request review comment objects include
author_association, but the current mirror schema, entity, and handler only store:As a result, inline diff review comments cannot contribute maintainer/member role evidence to
contributor_repo_roles.This matters because
pr_labels_by_actorandissue_labels_by_actorresolve labelactor_associationthroughcontributor_repo_roles, and miner API responses expose that value.Steps to Reproduce
pull_request_review_comment.createdwebhook wherepayload.comment.author_association = 'MEMBER'.pr_labels_by_actororissue_labels_by_actor.Expected Behavior
The inline review comment should preserve the actor's GitHub association, and label actor role resolution should be able to use it.
The label row should expose
actor_association = 'MEMBER'or the equivalent GitHub association value.Actual Behavior
review_commentsstores no association field, so the actor has no usable role evidence from the inline review comment. The label row can returnactor_association = null.Environment
Additional Context
Affected code:
packages/das/src/webhook/handlers/review-comment.handler.tspackages/das/src/entities/ReviewComment.entity.tspackages/db/06_review_comments.sqlpackages/db/20_view_contributor_repo_roles.sqlpackages/db/24_view_pr_labels_by_actor.sqlpackages/db/25_view_issue_labels_by_actor.sqlGitHub references:
pull_request_review_commentis the webhook event for PR diff comments: https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request_review_commentauthor_association: https://docs.github.com/en/rest/pulls/comments?apiVersion=2022-11-28This is distinct from #13/#14. That fix added submitted PR reviews and issue/PR thread comments as role evidence, but inline PR review comments remain excluded because their
author_associationis never stored.