Skip to main content

Module status

Module status 

Source
Expand description

Fetching the status of many PRs in batched GraphQL queries, and deriving the reasons each one needs attention.

A query holds up to 50 lookups, each under its own alias. Check counts come from GitHub’s per-state totals; listing the checks themselves is what makes a status query slow (50 PRs with their checks can pass GitHub’s 10s timeout), so the names of failing checks are fetched in follow-up queries only for PRs that have failures. All context pages are then read so older workflow runs can be distinguished from their replacements. Review threads come 100 to a page and the rare PR with more is paged the same way.

Structs§

Attention
Checks
EntireStatus
What Entire says about a PR: its gates, from the check, and when the findings gate fails and the entire CLI could be asked, the open findings.
FetchResult
What fetch found.
Fetched
A PR as fetched, with what is still needed to finish paging it.
Incomplete
A search GitHub cut short: it lists at most 1,000 results across all pages, however many match.
PrStatus

Enums§

Lookup
One aliased entry in a query.
Mergeability
State

Functions§

fetch
Fetches every PR the lookups name, following search pages and finishing each PR’s thread and check pages. PRs keep the order they were named in, and one named twice is reported once.
settle
Re-queries open PRs whose mergeable state is still unknown until the forge settles it or settle runs out.