Skip to content

Commit c0bfb94

Browse files
GiggleLiuclaude
andcommitted
fix: add list review-pool mode to pipeline_board.py
Adds `review-pool` as a plain listing mode (all items in Review pool, both Issue and PullRequest cards, without Copilot-review filtering). Also makes `status_items` accept both Issue and PullRequest content types via an optional parameter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dce1723 commit c0bfb94

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

scripts/pipeline_board.py

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,24 +264,35 @@ def ready_entries(board_data: dict) -> dict[str, dict]:
264264
return entries
265265

266266

267-
def status_items(board_data: dict, status_name: str) -> list[dict]:
267+
def status_items(
268+
board_data: dict,
269+
status_name: str,
270+
*,
271+
content_types: set[str] | None = None,
272+
) -> list[dict]:
273+
if content_types is None:
274+
content_types = {"Issue"}
268275
items = []
269276
for item in board_data.get("items", []):
270277
if item.get("status") != status_name:
271278
continue
272279

273280
content = item.get("content") or {}
274-
if content.get("type") != "Issue":
281+
item_type = content.get("type")
282+
if item_type not in content_types:
275283
continue
276284

277285
number = content.get("number")
278286
if number is None:
279287
continue
280288

289+
issue_number = int(number) if item_type == "Issue" else None
290+
pr_number = int(number) if item_type == "PullRequest" else None
281291
entry = build_entry(
282292
item,
283293
number=int(number),
284-
issue_number=int(number),
294+
issue_number=issue_number,
295+
pr_number=pr_number,
285296
)
286297
entry["item_id"] = item_identity(item)
287298
items.append(entry)
@@ -1017,7 +1028,7 @@ def parse_args(argv: list[str]) -> argparse.Namespace:
10171028
ack_parser.add_argument("item_id")
10181029

10191030
list_parser = subparsers.add_parser("list")
1020-
list_parser.add_argument("mode", choices=["ready", "in-progress", "review"])
1031+
list_parser.add_argument("mode", choices=["ready", "in-progress", "review-pool", "review"])
10211032
list_parser.add_argument("--repo")
10221033
list_parser.add_argument("--owner", default="CodingThrust")
10231034
list_parser.add_argument("--project-number", type=int, default=8)
@@ -1081,6 +1092,13 @@ def main(argv: list[str] | None = None) -> int:
10811092
if args.mode == "in-progress":
10821093
items = status_items(board_data, STATUS_IN_PROGRESS)
10831094
return print_candidate_list(args.mode, items, fmt=args.format)
1095+
if args.mode == "review-pool":
1096+
items = status_items(
1097+
board_data,
1098+
STATUS_REVIEW_POOL,
1099+
content_types={"Issue", "PullRequest"},
1100+
)
1101+
return print_candidate_list(args.mode, items, fmt=args.format)
10841102
if args.mode == "review":
10851103
items = review_candidates(
10861104
board_data,

0 commit comments

Comments
 (0)