Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eclairevoyant/6a1c09db89960e29545b02357d7cd24c to your computer and use it in GitHub Desktop.
Save eclairevoyant/6a1c09db89960e29545b02357d7cd24c to your computer and use it in GitHub Desktop.
Nixpkgs Committer Progress
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash gh
set -eu
# See <https://gist.github.com/lorenzleutgeb/239214f1d60b1cf8c79e7b0dc0483deb>.
# Will exit non-zero if not logged in.
gh auth status
if [ $# == 1 ]
then
# Pass GitHub login name as commandline argument.
LOGIN=$1
else
# Default to currently logged in user.
LOGIN=$(gh api user --jq .login)
fi
BASE="gh pr list --repo NixOS/nixpkgs --json id --jq length --limit 500"
MERGED=$($BASE --author "$LOGIN" --state merged)
REVIEWED=$($BASE --search reviewed-by:"$LOGIN" --state all)
cat << EOM
――――――――――
- [$MERGED PRs merged](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Amerged+author%3A$LOGIN)
- [$REVIEWED PRs reviewed](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+reviewed-by%3A$LOGIN)
EOM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment