->
addArgument('issue', InputArgument::OPTIONAL, 'The corresponding Jira ticket key. Can be the key of a single ticket or the key of an epic.'
) ->
addOption('date', null, InputOption::VALUE_OPTIONAL, 'The date in `YYYY-MM-DD` format which indicates the creation date of the change. Default is current date.'
) ->
addOption('flag', null, InputOption::VALUE_OPTIONAL, 'Feature Flag ID'
) ->
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;
});