Last active
March 13, 2019 18:16
-
-
Save dgoeke/a742c323bec065e191d6bd518c15a19e to your computer and use it in GitHub Desktop.
co-authored-by
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
get_user() { | |
URL="https://api.github.com/users/$1" | |
RESULT=$(curl -s "$URL") | |
ID=$(echo "$RESULT" | sed -En 's/.*"id": ([0-9]+).*/\1/p') | |
NAME=$(echo "$RESULT" | sed -En 's/.*"name": "(.*)".*/\1/p') | |
echo "Co-authored-by: $NAME <[email protected]>" | |
} | |
for USER in "$@" | |
do | |
get_user "$USER" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment