mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 01:51:31 +02:00
[ticket/10044] Stop when failed to retrieve network/collaborators.
PHPBB3-10044
This commit is contained in:
@@ -50,11 +50,20 @@ $repository = get_arg($opts, 'r', 'phpbb3');
|
||||
$developer = get_arg($opts, 'm', '');
|
||||
$dry_run = !get_arg($opts, 'd', true);
|
||||
run(null, $dry_run);
|
||||
exit(work($scope, $username, $repository, $developer));
|
||||
|
||||
function work($scope, $username, $repository, $developer)
|
||||
{
|
||||
// Get some basic data
|
||||
$network = get_network($username, $repository);
|
||||
$collaborators = get_collaborators($username, $repository);
|
||||
|
||||
if ($network === false || $collaborators === false)
|
||||
{
|
||||
echo "Error: failed to retrieve network or collaborators\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch ($scope)
|
||||
{
|
||||
case 'collaborators':
|
||||
@@ -101,6 +110,7 @@ foreach ($remotes as $remote)
|
||||
}
|
||||
|
||||
run('git remote update');
|
||||
}
|
||||
|
||||
function clone_repository($username, $repository, $pushable = false)
|
||||
{
|
||||
|
Reference in New Issue
Block a user