Skip to content

Commit 0aae642

Browse files
committed
fix: update pagination and variable
1 parent ff1be4c commit 0aae642

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gh-cli/copy-team-members.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ fi
3939

4040
echo -e "\ncopying members from $source_org/$source_team to $target_org/$target_team\n"
4141

42-
GH_TOKEN=$SOURCE_TOKEN gh api graphql -f org="$source_org" -f teamslug="$source_team" -F query='query($org:String! $teamslug:String! $cursor:String) {
42+
GH_TOKEN=$SOURCE_TOKEN gh api graphql --paginate -f org="$source_org" -f teamslug="$source_team" -F query='query($org:String! $teamslug:String! $endCursor:String) {
4343
organization(login: $org) {
4444
team(slug: $teamslug) {
45-
members(first: 100, after:$cursor, membership: IMMEDIATE) {
45+
members(first: 100, after:$endCursor, membership: IMMEDIATE) {
4646
pageInfo {
4747
hasNextPage
4848
endCursor

0 commit comments

Comments
 (0)