Skip to content

Maintainer sweep: assign a PR to the assignee of the issue it closes #1889

Closed

Description

@tombeckenham

Problem

The maintainer sweep (.github/workflows/maintainer-sweep.yml) assigns PRs and issues separately. routePR routes by changed files and routeIssue routes by title/body text, each with its own load count. A PR that closes an issue therefore usually gets a different assignee than that issue. On 2026-10-23 all 4 open closing pairs were mismatched (#1791/#1788, #1705/#1703, #1690/#1689, #1559/#1558); those were reassigned by hand.

collect.ts already reads closingIssuesReferences into pr.linkedIssues, but routing does not use it.

Change

  1. In scripts/maintainer/sweep.ts planSweep: when an unassigned PR closes an issue that has an assignee, and that assignee is a roster maintainer who did not author the PR, assign the PR to them. This wins over the core-review (AlemTuzlak) rule. Otherwise route as today.
  2. Add a test in scripts/maintainer/sweep.test.ts covering: issue assignee wins (incl. over core-review), author fallback to normal routing.
  3. Update the "Assignment order" section of scripts/maintainer/README.md.
  4. Run the sweep with plain node instead of tsx (package.json maintainer:sweep, and any other tsx script in scripts/maintainer). Drop tsx from devDependencies if nothing else uses it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

has-prAn open PR references this issuewaiting-on: maintainerThe ball is in the maintainers’ court

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions