Skip to content

Instantly share code, notes, and snippets.

View thiagocontelli's full-sized avatar
🔥

Thiago Contelli thiagocontelli

🔥
View GitHub Profile
@thiagocontelli
thiagocontelli / change-repo-visibility.sh
Created March 11, 2026 02:41
Change repos visibility
#!/bin/bash
# Replace this with your GitHub username
USERNAME="<your-username>"
# Visibility: private | public | internal
VISIBILITY="private"
for repo in $(gh repo list $USERNAME --limit 100 --json name --jq '.[].name')
do
@thiagocontelli
thiagocontelli / change_repos_visibility.sh
Created March 5, 2024 18:52
Change all repositories visibility to public
repos=$(gh repo list [your_username] --visibility private --json nameWithOwner -q '.[].nameWithOwner')
for repo in $repos
do
gh api -X PATCH repos/$repo -f visibility=public
echo "Visibility of $repo changed to public"
done