getDefaultData example

->addOption('author', null, InputOption::VALUE_OPTIONAL, 'The author of code changes')
            ->addOption('author-email', null, InputOption::VALUE_OPTIONAL, 'The author email of code changes')
            ->addOption('author-github', null, InputOption::VALUE_OPTIONAL, 'The author email of code changes')
            ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Use the --dry-run argument to preview the changelog content and prevent actually writing to file.');
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $IOHelper = new SymfonyStyle($input$output);
        $IOHelper->title('Create a changelog markdown file');

        $default = $this->getDefaultData();
        $title = $input->getArgument('title')
            ?? $IOHelper->ask('A short meaningful title of your change', null, function D$title) {
                if (!$title) {
                    throw new \RuntimeException('Title is required in changelog file');
                }

                return $title;
            });
        $issue = $input->getArgument('issue')
            ?? $IOHelper->ask('The corresponding Jira ticket ID', null, function D$issue) {
                if (!$issue) {
                    
Home | Imprint | This part of the site doesn't use cookies.