Whats the git command line that counts PR made for a period of time?


I can list the number of PRs for the year made in git in the github PR web page by adding the filter as below

is:pr created:>2020-01-01 

How can I do that in the command line?


There is no Git command to do this because GitHub pull requests are not a feature of Git.

There is a command-line interface for GitHub, it has a command gh pr list which is supposed to list the pull requests based on different criteria.

Currently the documentation lists these options:

  -a, --assignee string   Filter by assignee
  -B, --base string       Filter by base branch
  -l, --label strings     Filter by labels
  -L, --limit int         Maximum number of items to fetch (default 30)
  -s, --state string      Filter by state: {open|closed|merged|all} (default "open")
  -w, --web               Open the browser to list the pull requests

So it seems there is no possibility to filter the pull requests by date, either.

Answered By – mkrieger1

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published