mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/10044] Stop when failed to retrieve network/collaborators.
PHPBB3-10044
This commit is contained in:
parent
bf137b7005
commit
ed53cef0aa
1 changed files with 54 additions and 44 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue