Skip to content

feat(pr-management): let the code-review pr: selector name several PRs - #2055

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:code-review-multi-pr-selector
Nov 10, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:code-review-multi-pr-selector

Conversation

@potiuk

@potiuk potiuk commented Nov 10, 2026

Copy link
Copy Markdown
Member

Summary

pr-management-code-review pr:<N> took exactly one PR, so reviewing a handful of named PRs meant a separate session per PR. The selector now also accepts:

  • a comma list: pr:1929,1944,2013
  • an inclusive range: pr:2005-2008 (# prefixes allowed, as in pr:#1929)
  • repeated tokens: pr:1944 pr:1929

Duplicates are dropped, a selector naming more than 50 PRs is refused (a fat-fingered range), and the queue keeps the order the maintainer named instead of sorting by last update. A named PR that isn't in the open-PR sweep (closed, merged, or a typo) is reported in the queue's new not_open list instead of silently disappearing.

pr_number stays in the selector output, set when exactly one PR is named, beside the new pr_numbers, so single-PR callers are unchanged. The mode is still single-pr, so classifications/selector-single-pr.md (now titled "named PRs") keeps applying.

Changes

  • tools/pr-management/src/pr_management/code_review/selectors.py: pr_numbers list, parse_pr_list, named-order sorting.
  • tools/pr-management/src/pr_management/code_review/cli.py: not_open in the queue output.
  • tools/pr-management/tests/code_review/test_selectors.py: list, range, repeat and dedupe parsing; refusals (empty, non-numeric, trailing comma, backwards range, over 50, bad separator); named order and filter bypass in the queue.
  • Docs: invocation.md (example and parameter row), SKILL.md Inputs, selector-single-pr.md, tools/pr-management/README.md; the magpie-security-tools copy and the measured_tokens stamp are regenerated.

Testing

  • uv run --project tools/pr-management pytest tools/pr-management: passes.
  • prek run --files <changed files>: passes.

🤖 Generated with Claude Code

`pr:<N>` took exactly one number, so reviewing a handful of named PRs
meant one session per PR. The selector now also takes `pr:N,M`,
inclusive ranges `pr:N-M` (optional `#` prefixes) and repeated `pr:`
tokens; duplicates are dropped, at most 50 PRs, and the queue keeps the
order the maintainer named. A named PR missing from the open-PR sweep
is reported in the queue's new `not_open` list instead of vanishing.

`pr_number` stays in the selector output (set when exactly one PR is
named) beside the new `pr_numbers`, so single-PR callers are unchanged.

Generated-by: Claude Opus 5
@potiuk
potiuk enabled auto-merge (squash) November 10, 2026 17:29
@potiuk
potiuk disabled auto-merge November 10, 2026 17:30
@potiuk
potiuk enabled auto-merge (squash) November 10, 2026 17:30
@github-actions github-actions Bot added family:pr-management pr-management-* skills family:tools tools/* family:docs Docs, MISSION.md, READMEs capability:review Deep per-item code review or contributor mentoring substrate:analytics Tool substrate: read-only metrics / dashboards / renderers labels Nov 10, 2026
@potiuk
potiuk merged commit 5e5a34d into apache:main Nov 10, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:review Deep per-item code review or contributor mentoring family:docs Docs, MISSION.md, READMEs family:pr-management pr-management-* skills family:tools tools/* substrate:analytics Tool substrate: read-only metrics / dashboards / renderers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant