list_all_public_repos.sh+repos.txt
This commit is contained in:
parent
aaa772f455
commit
35934690be
39
list_all_public_repos.sh
Normal file
39
list_all_public_repos.sh
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Load environment variables
|
||||||
|
GITHUB_TOKEN="${GITHUB_TOKEN:?❌ Error: GITHUB_TOKEN is not set in ~/.zshrc}"
|
||||||
|
|
||||||
|
echo "🔍 Fetching all public repositories owned by user..."
|
||||||
|
USER_PUBLIC_REPOS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
"https://api.github.com/user/repos?per_page=100&type=public" | jq -r '.[].full_name')
|
||||||
|
|
||||||
|
if [[ -z "$USER_PUBLIC_REPOS" ]]; then
|
||||||
|
echo "❌ No public repositories found for user."
|
||||||
|
else
|
||||||
|
echo "📂 Public Repositories (User-Owned):"
|
||||||
|
echo "$USER_PUBLIC_REPOS"
|
||||||
|
echo "--------------------------------------------"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🔍 Fetching organizations..."
|
||||||
|
ORG_LIST=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
"https://api.github.com/user/orgs" | jq -r '.[].login')
|
||||||
|
|
||||||
|
if [[ -z "$ORG_LIST" ]]; then
|
||||||
|
echo "❌ No organizations found for user."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🔍 Fetching all public repositories under organizations..."
|
||||||
|
for ORG in $ORG_LIST; do
|
||||||
|
ORG_PUBLIC_REPOS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
"https://api.github.com/orgs/$ORG/repos?per_page=100&type=public" | jq -r '.[].full_name')
|
||||||
|
|
||||||
|
if [[ -z "$ORG_PUBLIC_REPOS" ]]; then
|
||||||
|
echo "🚫 No public repositories found in organization: $ORG"
|
||||||
|
else
|
||||||
|
echo "📂 Public Repositories ($ORG):"
|
||||||
|
echo "$ORG_PUBLIC_REPOS"
|
||||||
|
fi
|
||||||
|
echo "--------------------------------------------"
|
||||||
|
done
|
||||||
10
repos.txt
Normal file
10
repos.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
bytelyst-ai/activetracker
|
||||||
|
bytelyst-ai/Cover_letter_generator
|
||||||
|
bytelyst-ai/crewai
|
||||||
|
bytelyst-ai/photo-album
|
||||||
|
bytelyst-ai/prompted-insipiration
|
||||||
|
bytelyst-ai/quote_generator
|
||||||
|
bytelyst-ai/Task-Manager
|
||||||
|
bytelyst-ai/task-recommendation
|
||||||
|
bytelyst-ai/timer
|
||||||
|
bytelyst-ai/voiceapp
|
||||||
Loading…
Reference in New Issue
Block a user