GH-PR-LIST(1)
π GH-PR-LIST(1) β like, the whole entire manual, bestie
okay so this is gh-pr-list from the GitHub CLI manual β yes, that GitHub CLI, the one you keep forgetting to update β and it's literally the page that teaches you how to list pull requests from your terminal like a main character. sit down, grab a boba, we're doing this π§β¨
πΈ NAME πΈ
gh-pr-list β List pull requests in a repository. that's it. that's the whole vibe. π
β¨ SYNOPSIS β¨
gh pr list [flags]
π¦ DESCRIPTION π¦
so you wanna see the PRs in a GitHub repository. iconic. by default this only lists open PRs β like, it's not gonna dump every closed and merged thing in your face unless you ask, because it respects you. π«Ά
the search query syntax is documented here, and yes you have to actually go read it:
β¨https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requestsβ©
and on supported GitHub hosts, you can use advanced issue search syntax inside the --search query. that's the fancy stuff. for more info on advanced issue search, see:
β¨https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests#building-advanced-filters-for-issuesβ©
ngl those URLs are giving "assigned reading" but they're lowkey useful, iykyk π
π OPTIONS π
this is the part you actually came for. every single flag, no skips, no cap:
--app <string>β filter by GitHub App author. yes, bots have feelings too π€-a,--assignee <string>β filter by assignee. who's holding the bag on this one-A,--author <string>β filter by author. and hey β use--appif you're filtering by a GitHub App, bestie, don't mix them up π-B,--base <string>β filter by base branch. the branch it's merging into, okay-d,--draftβ filter by draft state. for the PRs that aren't ready yet (real)-H,--head <string>β filter by head branch. heads up: the":"syntax is not supported here π-q,--jq <expression>β filter JSON output using a jq expression. chef's kiss for piping π--json <fields>β output JSON with the specified fields. pick your faves (full list further down π)-l,--label <strings>β filter by label. multiple labels = multiple flags, see the example-L,--limit <int>(default30) β maximum number of items to fetch. thirty is the default, don't come for me-S,--search <query>β search pull requests with query. go wild with that advanced syntax-s,--state <string>(default"open") β filter by state:{open|closed|merged|all}. the whole squad of states π-t,--template <string>β format JSON output using a Go template; seegh help formatting-w,--webβ list pull requests in the web browser. for when you want the β¨graphical experienceβ¨
π OPTIONS INHERITED FROM PARENT COMMANDS π
the parent commands said "here, take these too":
-R,--repo <[HOST/]OWNER/REPO>β select another repository using the[HOST/]OWNER/REPOformat. yes that bracket syntax is intentional, it's giving optional-host energy π
π ALIASES π
gh pr ls
that's it. ls works. type less, slay more. literally.
π§ JSON FIELDS π§
here's the full menu of fields you can pass to --json, and i'm listing every single one because i would never do you dirty like that:
additions, assignees, author, autoMergeRequest, baseRefName, baseRefOid, body, changedFiles, closed, closedAt, closingIssuesReferences, comments, commits, createdAt, deletions, files, fullDatabaseId, headRefName, headRefOid, headRepository, headRepositoryOwner, id, isCrossRepository, isDraft, labels, latestReviews, maintainerCanModify, mergeCommit, mergeStateStatus, mergeable, mergedAt, mergedBy, milestone, number, potentialMergeCommit, projectCards, projectItems, reactionGroups, reviewDecision, reviewRequests, reviews, state, statusCheckRollup, title, updatedAt, url
that's a lot. that's the point. pick what you need π
π EXIT CODES π
when the command comes back, it comes back with a number, and the number means things:
0β Successful execution π1β Error π2β Command canceled π4β Authentication required π
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. so like, don't @ me if there's a fifth one hiding somewhere
π₯ EXAMPLE π₯
copy these exactly, bestie, they're tested:
# List PRs authored by you
$ gh pr list --author "@me"
# List PRs opened by a GitHub App such as Dependabot
$ gh pr list --app dependabot
# List PRs with a specific head branch name
$ gh pr list --head "typo"
# List only PRs with all of the given labels
$ gh pr list --label bug --label "priority 1"
# Filter PRs using search syntax
$ gh pr list --search "status:success review:required"
# Find a PR that introduced a given commit
$ gh pr list --search "<SHA>" --state merged
not the --label one needing two whole flags for two labels β the way that's just how it works π and yes, "<SHA>" is a placeholder, swap in your actual SHA, please don't run it literally.
π SEE ALSO π
gh-pr(1)β go read the parent, it's the whole PR universe
and that's the page!! mwah π this was GitHub CLI v2.102.0, dated Oct 2026, and it's the GH-PR-LIST(1) manual page β go list some PRs, you absolute icon π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms