Last active
July 2, 2025 23:49
-
-
Save dotysan/b2e26479978c3821b8251937096218d2 to your computer and use it in GitHub Desktop.
Find all my GitHub rulesets
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 bash | |
# | |
# Find all my GitHub repositories that have rulesets. | |
# | |
# as a oneliner: `gh repo list --limit 1000|while read -r repo rest;do gh ruleset list --repo "$repo"|while read id rest;do gh ruleset view --repo "$repo" "$id";echo;done;done` | |
# | |
# If you have more than 1000 repos, adjust! | |
# | |
gh repo list --limit 1000 |while read -r repo rest | |
do | |
gh ruleset list --repo "$repo" |while read id rest | |
do | |
gh ruleset view --repo "$repo" "$id" | |
echo | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment