- You have GitHub CLI installed and logged in
- You have gh repo-collab extention intalled
- You have the permission to list all repositories in your organisation
gh repo list -L 50 <organisation> | \ # 50 is the number of repositories to be listed
awk '{print $1}' | \
while read line; \
do yes | gh repo-collab add $line '<username|team-name>' --permission <pull>;
done