I’m using the Github CLI tool, which includes a command gh pr list
that allows you to see all the open pull requests.
The issue is that I only see a list of their titles and there’s a separate command gh pr view [extra info]
that actually allows you to see the body
.
I’m searching for pull requests that have a certain phrase in the BODY so gh pr list | grep “hello”
wouldn’t work because it only gives me pull requests with “hello”
in the header, and not necessarily the body.
How might I go about approaching this problem and are there any shortcuts in the github cli that might help me?
Sicne
gh pr list
, likegh pr view
, does inherit from the same option--json <fields>
(Output JSON with the specified fields), you can use:That would grep for your specific message, and still give you an ID that you can use with
gh pr view
.