Skip to content

Commit

Permalink
notify number of project found (closes #7), fixes ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
mborne committed Aug 25, 2018
1 parent 5bfadc2 commit bab32b3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/MBO/SatisGitlab/Command/GitlabToConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
use MBO\SatisGitlab\Git\ClientOptions;
use MBO\SatisGitlab\Git\GitlabProject;
use MBO\SatisGitlab\Filter\FilterCollection;

use MBO\SatisGitlab\Filter\IgnoreRegexpFilter;
use MBO\SatisGitlab\Filter\IncludeIfHasFileFilter;


Expand Down Expand Up @@ -171,6 +173,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
/*
* Scan gitlab pages until no more projects are found
*/
$projectCount = 0;
for ($page = 1; $page <= self::MAX_PAGES; $page++) {
$findOptions['page'] = $page;
$projects = $client->find($findOptions);
Expand Down Expand Up @@ -206,6 +209,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
}

/* add project to satis config */
$projectCount++;
$logger->info($this->createProjectMessage(
$project,
"$projectName:*"
Expand All @@ -225,6 +229,13 @@ protected function execute(InputInterface $input, OutputInterface $output) {
}
}

/* notify number of project found */
if ( $projectCount == 0 ){
$logger->error("No project found!");
}else{
$logger->info(sprintf("Number of project found : %s",$projectCount));
}

/*
* Write resulting config
*/
Expand Down

0 comments on commit bab32b3

Please sign in to comment.