Skip to content

fix(roadmap): scope pull request queries for reprioritization to avoid full repository PR enumeration #1246

Closed

Description

@dan-petty

Problem

In PR #1245, _OPEN_PULL_REQUESTS_QUERY was changed to query states: [OPEN, MERGED]. Because it queries repository-wide without pagination, totalCount (536) exceeds the single-page limit of 100. This triggers _require_whole, causing devops roadmap reprioritize to fail with:

✗ Could not plan reprioritization: Read 100 of 536 open pull requests, so the read is incomplete.

Additionally, GitHub GraphQL orders by CREATED_AT ascending by default, so only the 100 oldest historical PRs from repository creation are retrieved, missing all recent merged PRs for active releases.

Proposed Solution

  1. Restore _OPEN_PULL_REQUESTS_QUERY to query states: [OPEN] (open PRs across the repo are small in number and fit in a single page).
  2. For merged PRs in active releases, query PRs targeting the release branch (pullRequests(baseRefName: $branch, first: 100)), which reliably retrieves all in-flight and merged PRs for the release without scanning historical PRs.
  3. Update reprioritize.py to inspect both open PRs and the release branch's PRs when linking PRs to issues.

Activity

  1. added this to the v0.2.27 milestone on Oct 6, 2026
  2. added
    type/bug
    scope/github
    priority/p0-critical
    on Oct 6, 2026
  3. added a commit that references this issue on Oct 6, 2026
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

    priority/p0-criticalscope/githubtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions