feat(forge): search pull requests and issues, pr close and reopen, pr view --body and --json #6
No reviewers
Labels
No labels
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Tooling!6
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Tooling:forge-search-close-body"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
An agent spent hours on a change that another contributor already had open as a WIP pull request:
pr listshows only titles, and nothing searched the descriptions. A superseded PR could only be commented on, not closed, and editing a description meant calling the API by hand to get its raw text. These are the missing commands, for every repositoryforge.pyworks on.What changed
search WORD|"A PHRASE" ... [--state open|closed|all] [--mine] [--limit N]: pull requests and issues whose title or description has every word (any case), with number, PR or issue, state (open, wip, merged, closed), author, title and the matching line. It lists the items and matches locally, since Forgejo's indexer missed results.pr close N (--comment TEXT | --comment-file F) [--force]posts the reason, then closes; someone else's PR needs--force.pr reopen N [--comment ...]opens a closed one (not a merged one).pr view N --bodyprints the description exactly as stored (CRLF kept);--jsonprints its fields.command(); docs indocs/forge.md(new Search before building section); tests intests/test_forge_pr.pyand a newtests/test_forge_search.py.Ported from Longshot's pull request Longshot#831 by zeldaootr, now that
forge.pylives here (Tooling#1, Longshot#915). The port keeps their behavior and tests; only the paths, the repository (globalREPO) and the hint text differ.Testing
No tests were run on this PC (not
tests/run_all.py, not a single check, and no calls against the forge). The tests ported with the change passed for the author on Longshot; they still need a run here:python -I -B tests/run_all.py.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.