Esempio n. 1
0
 /**
  * @test
  */
 public function formats_enums()
 {
     foreach (GitRepoHelper::$enum as $domain => $type) {
         foreach (array_keys($type) as $name) {
             $res = GitRepoHelper::formatEnum($domain, $name);
             $this->assertNotNull($res);
         }
     }
 }
Esempio n. 2
0
    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this->setName('issue:list')->setDescription('List issues')->addOption('label', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY)->addOption('milestone', null, InputOption::VALUE_REQUIRED)->addOption('assignee', null, InputOption::VALUE_REQUIRED, 'Username assignee. None for unassigned.')->addOption('creator', null, InputOption::VALUE_REQUIRED, 'The user that created the issue.')->addOption('mentioned', null, InputOption::VALUE_REQUIRED, 'The user mentioned in the issue.')->addOption('state', null, InputOption::VALUE_REQUIRED, GitRepoHelper::formatEnum('issue', 'state'))->addOption('sort', null, InputOption::VALUE_REQUIRED, GitRepoHelper::formatEnum('issue', 'sort'))->addOption('direction', null, InputOption::VALUE_REQUIRED, GitRepoHelper::formatEnum('issue', 'direction'))->addOption('type', null, InputOption::VALUE_REQUIRED, GitRepoHelper::formatEnum('issue', 'type'))->addOption('since', null, InputOption::VALUE_REQUIRED, 'Only issues after this time are displayed.')->setHelp(<<<EOF
The <info>%command.name%</info> command lists issues from either the current or the given organization
and repository:

    <info>\$ php %command.name%</info>
    <info>\$ php %command.name% --creator=cordoval --sort=created --direction=desc --since="6 months ago"
    --type=pr</info>

All of the parameters provided by the github API are supported:

    https://developer.github.com/v3/issues/#list-issues-for-a-repository

With the addition of the <info>--type</info> option which enables you to filter show only pull-requests or only issues.

EOF
);
    }