Description
git-pr list
lists the open pull requests targeted towards a repository. If the command is run in a local clone of a personal fork, then git-pr list
will list pull requests targeted to the upstream repository (the repository the personal fork was created from). The various flags to git-pr list
can be used to filter the pull requests that should be listed. The flag --columns
can be used to specify the columns that should printed. The flag --no-decoration
removes any additional output, this can be useful for scripting.
Usage
$ git pr list -h usage: git-pr [options] [<ID>] -u, --username NAME Username on host -r, --remote NAME Name of remote, defaults to 'origin' --authors LIST Comma separated list of authors --assignees LIST Comma separated list of assignees --labels LIST Comma separated list of labels --issues LIST Comma separated list of issues --columns id,title,author,assignees,labels Comma separated list of columns to show --no-decoration Hide any decorations when listing PRs --no-draft Hide all pull requests in draft state --no-token Do not use a personal access token (PAT) --verbose Turn on verbose output --debug Turn on debugging output --version Print the version of this tool -h, --help Show this help text
Examples
List the open pull requests for the openjdk/skara repository:
$ git pr list ID TITLE AUTHORS STATUS 786 Include 'treconfigure' in help for git trees magicus ready
List the open pull requests for the openjdk/skara repository and show only the "TITLE" and "URL" columns:
$ git pr list --columns=title,url TITLE URL Include 'treconfigure' in help for git trees https://github.com/openjdk/skara/pull/786
List the open pull requests for the openjdk/skara repository, filter out the ones with the "sponsor" label, show only the "ID" column, hide any decorative text:
$ git pr list --columns=id --no-decoration --labels=sponsor 786
Configuration
All flags to git-pr list
can be configured to have default values. For example, to configure git-pr list
to always show only the "ID" and "TITLE" columns by default, run:
$ git config --global pr.list.columns id,title
Source
See GitPrList.java.