fix(forge): pr view --comments shows formal reviews and inline feedback #5

Open
HumanBean wants to merge 1 commit from HumanBean/Tooling:fix/pr-view-reviews into main
Owner

Why

forge.py pr view N --comments only showed the discussion thread. A reviewer's verdict (for example "request changes") and the inline comments explaining it were not shown, so someone following review feedback from the command line could see that a PR was blocked but not why.

What changed

  • scripts/forge.py: pr view N --comments now also prints each submitted review (verdict, summary, commit, marked dismissed/stale) and its inline comments (file and position, marked resolved, with links). Discussion, reviews and inline comments are all paged, overlapping entries are shown once, and paging stops when a page adds nothing new (the server repeats entries on some endpoints). Drafts and unanswered review requests are left out. issue view is unchanged.
  • tests/test_forge_pr.py: eight checks for the output, overlap, state filtering, locations, paging with server caps of 20 and 50, ignored page numbers, unchanged default output and API failure.
  • docs/forge.md: describes the added output and paging.

Ported from Longshot#310 by monsterlag, since forge.py now lives in Tooling (Tooling#1). The code is theirs; only the context lines were adapted to Tooling's layout.

Testing

No tests were run on this PC: not tests/run_all.py, not a single check. The ported tests were run by the original author against Longshot's copy of the file (see Longshot#310); they have not been run against Tooling's copy, so please run python -I -B tests/run_all.py before merging.

🤖 Generated with Claude Code

## Why `forge.py pr view N --comments` only showed the discussion thread. A reviewer's verdict (for example "request changes") and the inline comments explaining it were not shown, so someone following review feedback from the command line could see that a PR was blocked but not why. ## What changed - `scripts/forge.py`: `pr view N --comments` now also prints each submitted review (verdict, summary, commit, marked dismissed/stale) and its inline comments (file and position, marked resolved, with links). Discussion, reviews and inline comments are all paged, overlapping entries are shown once, and paging stops when a page adds nothing new (the server repeats entries on some endpoints). Drafts and unanswered review requests are left out. `issue view` is unchanged. - `tests/test_forge_pr.py`: eight checks for the output, overlap, state filtering, locations, paging with server caps of 20 and 50, ignored page numbers, unchanged default output and API failure. - `docs/forge.md`: describes the added output and paging. Ported from [Longshot#310](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/310) by monsterlag, since forge.py now lives in Tooling ([Tooling#1](https://git.magicbean.dev/MagicBeanDev/Tooling/pulls/1)). The code is theirs; only the context lines were adapted to Tooling's layout. ## Testing No tests were run on this PC: not `tests/run_all.py`, not a single check. The ported tests were run by the original author against Longshot's copy of the file (see Longshot#310); they have not been run against Tooling's copy, so please run `python -I -B tests/run_all.py` before merging. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
`pr view N --comments` listed only the discussion comments, so a review's verdict and its inline comments were
missing. It now also prints the submitted reviews (verdict, summary, commit, dismissed/stale) and their inline
comments (file position, resolved), pages all three feeds and shows overlapping entries once.

Ported from Longshot#310 by monsterlag (MagicBeanDev/Longshot#310).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/pr-view-reviews:HumanBean-fix/pr-view-reviews'
git switch 'HumanBean-fix/pr-view-reviews'
Sign in to join this conversation.
No reviewers
No labels
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Tooling!5
No description provided.