- source
$gat = getenv('GITHUB_ACCESS_TOKEN');
$go = getenv('GITHUB_ORGANIZATION');
$p = 1;
do {
$o = `curl -H "Authorization: token $gat" https://api.github.com/orgs/$go/repos?page=$p`;
$arr = json_decode($o);
foreach($arr as $k => $v) {
$sshurl = $v->ssh_url;
print($sshurl."\n");
`cd ~/src; git clone $sshurl`;
}
$p++;
} while (count($arr));
echo "done";