commit 47bfcff7c9bd40fd0871f4a26293243e12655b92 Author: Saravana Dhandapani Date: Sat Feb 8 21:01:04 2025 -0800 feat: fetch repos by user name diff --git a/list_repos_contributors_by_user.sh b/list_repos_contributors_by_user.sh new file mode 100644 index 0000000..eb3cfff --- /dev/null +++ b/list_repos_contributors_by_user.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# List all repositories for the user +REPOS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \ + "https://api.github.com/users/$GITHUB_USER/repos?per_page=100" | jq -r '.[].name') + +echo "Fetching contributors from all repositories..." +for REPO in $REPOS; do + echo "🔍 Scanning $REPO..." + curl -s -H "Authorization: token $GITHUB_TOKEN" \ + "https://api.github.com/repos/$GITHUB_USER/$REPO/contributors" | jq -r '.[].login' +done +