Created
October 18, 2022 09:28
-
-
Save rastandy/2fa2c68172704a01f62a81595123532c to your computer and use it in GitHub Desktop.
Revisions
-
rastandy created this gist
Oct 18, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/bin/bash user=$1 repo=$2 permissions=$3 echo "Adding ${user} to repo ${repo} with permissions ${permissions}..." gh api -XPUT repos/${repo}/collaborators/${user} -f permission=${permissions} echo "done." 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/bin/bash user=$1 repos_file=$2 permissions=$3 for i in `cat ${repos_file}` do ./add-user-to-repo.sh ${user} ${i} ${permissions} done