Skip to content

Use GraphQL to load mergeability status from GitHub #707

@Kobzol

Description

@Kobzol

Bors currently uses a very painstaking process of determining mergeability, checking each open PR one-by-one in a loop, because batch loading PRs through the REST API neither starts the mergeability check, nor does it return the actual mergability. However, I just found out that if we use open PRs using GraphQL instead, it will both start the mergeability check, and also actually return the mergeability status for a batch of PRs.

Thus we can vastly simplify the current mergeability checks. Not necessarily the whole implementation, but the number of requests that we make after a commit is pushed to a base branch, and also the duration it takes to fill mergeability.

We should modify the mergeability queue to add an operation that will batch load open PRs from GitHub after the push, to start the mergeability checks, and then try again after e.g. a minute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-hardDifficult issue that is not ideal for new contributors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions