Skip to content

Instantly share code, notes, and snippets.

@vixus0
Created June 3, 2022 09:46
Show Gist options
  • Save vixus0/5d5d461a436f41d50f7294dd0017c12d to your computer and use it in GitHub Desktop.
Save vixus0/5d5d461a436f41d50f7294dd0017c12d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# gitfeels: find out how many PRs you (or someone) had merged since some date
if test "$#" -lt 2; then
echo "Usage: $0 <username> <since YYYY-MM-DD>" >/dev/stderr
exit 1
fi
author="$1"
since="$2"
gh api --paginate "/search/issues?q=is:pr+author:${author}+archived:false+is:merged+merged:>=${since}&sort=created&order=asc" \
| jq -r '.items[] | .repo = (.repository_url | sub("https://api.github.com/repos/"; "")) | "\u001b[35m\(.repo)\u001b[36m #\(.number)+\u001b[32m\(.title)\u001b[0m"' \
| column -t -s+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment