Skip to content

[Bug] Inline PR review comments drop author_association, leaving label actor roles unresolved #83

@volcano303

Description

@volcano303

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

  1. Process a pull_request_review_comment.created webhook where payload.comment.author_association = 'MEMBER'.
  2. 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
  3. Process a label event where the same actor applies a label to a PR or issue.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions