protected function interact(InputInterface $input, OutputInterface $output)
{
/** @var \Gush\Application $application */
$application = $this->getApplication();
$adapters = $application->getAdapterFactory()->all();
$labels = $this->getAdapterLabels($adapters);
$styleHelper = $this->getHelper('gush_style');
$styleHelper->title('Gush configuration');
$styleHelper->text(['The <info>core:configure</info> command will help to configure Gush for usage.', 'Your authentication credentials are never stored in the local Git repository.']);
$styleHelper->newLine();
$styleHelper->section('Adapter configuration');
$styleHelper->text(['Gush uses adapters for repository-management and issue-tracking.', 'Adapters displayed with a "<info>*</info>" are already configured.', 'You are recommended to not skip this step if you configure Gush for the first time.']);
$styleHelper->newLine();
// Run in a loop to allow multiple selection
while (true) {
$adapterName = $styleHelper->numberedChoice('Choose adapter', $labels);
if ('noop' === $adapterName) {
break;
}
$this->configureAdapter($input, $output, $adapterName, $adapters[$adapterName]);
if (!$styleHelper->confirm('Do you want to configure other adapters?', false)) {
break;
}
}
}