Created
September 27, 2024 09:56
-
-
Save MelbourneDeveloper/eb5b1c570a97810f7f3bdc7b4c70cf6b to your computer and use it in GitHub Desktop.
Revisions
-
MelbourneDeveloper created this gist
Sep 27, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/bin/bash contributor_data=$(curl -s -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/Nimblesite/nimble_charts/commits?since=$(date -v-3m +%Y-%m-%dT%H:%M:%SZ)&per_page=100" | \ jq -r '.[] | select(.author != null) | "\(.author.login) \(.author.avatar_url)"' | sort | uniq -c | sort -rn | awk '{printf "%s %s %s\n", $2, $3, $1}') echo "| Avatar | Username | Commits |" echo "|--------|----------|---------|" echo "$contributor_data" | while read -r username avatar_url commits; do echo "| <img src=\"$avatar_url\" width=\"50\" height=\"50\" alt=\"$username\"> | [$username](https://github.com/$username) | $commits |" done