Skip to content

Commit

Permalink
fix: paginate through all available repositories (#2)
Browse files Browse the repository at this point in the history
use `api` subcommand with `--paginate` flag

fix #1
  • Loading branch information
sjungling authored Jan 21, 2025
1 parent 44e7a2c commit f7f27a2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ fi
organization=$1

# JQ
gh repo list "$organization" \
--json url,defaultBranchRef \
--jq '["cloneUrl","branch","org"], (.[] | [.url, .defaultBranchRef.name, "'"$organization"'"]) | @csv'
gh api --paginate "orgs/$organization/repos" \
--jq '["cloneUrl","branch","org"], (.[] | [.clone_url, .default_branch, "'"$organization"'"]) | @csv'

0 comments on commit f7f27a2

Please sign in to comment.