Skip to content

Hide outdated comments #334

Closed
Closed

Description

@Kobzol

To declutter PRs a bit, it would be nice if bors had a system for hiding old/not relevant comments:

Activity

  1. changed the title [-]Hide outdated comment about mergeability[/-] [+]Hide outdated comments[/+] on Jul 19, 2025
  2. JerryQ17 commented on Jul 19, 2025

    @JerryQ17
    Contributor

    rla is able to hide outdated comments (link), we can reuse that logic.

    If no one is working on this, I would like to have a try. I'm not familiar with GraphQL, so it'll take some time for me to complete it.😁

  3. Kobzol commented on Jul 19, 2025

    @Kobzol
    MemberAuthor

    Triagebot also has similar logic. It would be great if we can do it without GraphQL, but maybe it's the best way.

    We can either remember the node IDs of comments that we sent, along with some metadata, or we can scan comments on the PR from GH API. But the latter could be quite exppensive, not sure if there's a way to find comments by a specific author through the REST API.

  4. JerryQ17 commented on Jul 19, 2025

    @JerryQ17
    Contributor

    Triagebot also has similar logic. It would be great if we can do it without GraphQL, but maybe it's the best way.

    I think it's the only way. I can't find a REST API to minimize a comment.

    We can either remember the node IDs of comments that we sent, along with some metadata, or we can scan comments on the PR from GH API. But the latter could be quite exppensive, not sure if there's a way to find comments by a specific author through the REST API.

    The node id is required to minimize the comment anyway, remembering it will make the impl simpler.

    If we scan comments to get those posted by bors (either by a REST API or manually filter with GithubRepositoryClient::is_comment_internal), it's still difficult to determine which comment to hide from its contents. Maybe the metadata in <!-- homu: {} --> will be useful.

  5. Kobzol commented on Jul 19, 2025

    @Kobzol
    MemberAuthor

    We could use the metadata, but if we need the node ID anyway, then remembering it in the DB is a better idea anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions