Gush\Command\Release\ReleaseListCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $adapter = $this->getAdapter();
        $releases = $adapter->getReleases();
        $styleHelper = $this->getHelper('gush_style');
        $styleHelper->title(sprintf('Releases on %s/%s', $input->getOption('org'), $input->getOption('repo')));
        $table = $this->getHelper('table');
        $table->setHeaders(['Name', 'Tag', 'Draft', 'Pre-release', 'Created', 'Published', 'Link']);
        $table->formatRows($releases, $this->getRowBuilderCallback());
        $table->setFooter(sprintf('%s release(s)', count($releases)));
        $table->render($output, $table);
        return self::COMMAND_SUCCESS;
    }