Skip to content

Instantly share code, notes, and snippets.

@asci
Created November 19, 2021 10:29
Show Gist options
  • Save asci/87cff46fe866b20c819289c117eb5ade to your computer and use it in GitHub Desktop.
Save asci/87cff46fe866b20c819289c117eb5ade to your computer and use it in GitHub Desktop.
Get list of PRs merged in a timeframe
gh pr list --state merged --json mergedAt,title,url --limit 100 | jq --arg s $1 --arg e $2 '
[($s, $e) | strptime("%Y-%m-%d")[0:3]] as $r
| map(select(
(.mergedAt[:19] | strptime("%Y-%m-%dT%H:%M:%S")[0:3]) as $d
| $d >= $r[0] and $d <= $r[1]
))
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment