setAuthorEmail example


        $flag = $input->getOption('flag') ?? $IOHelper->ask('Feature Flag ID');
        $author = $input->getOption('author') ?? $IOHelper->ask('The author of code changes', $default['author']);
        $authorEmail = $input->getOption('author-email') ?? $IOHelper->ask('The author email of code changes', $default['authorEmail']);
        $authorGithub = $input->getOption('author-github') ?? $IOHelper->ask('The author GitHub account', $default['authorGithub']);

        $template = (new ChangelogDefinition())
            ->setTitle($title)
            ->setIssue($issue)
            ->setFlag($flag)
            ->setAuthor($author)
            ->setAuthorEmail($authorEmail)
            ->setAuthorGitHub($authorGithub);

        $IOHelper->section('Generating: ');
        $target = $this->generator->generate($template$date$input->getOption('dry-run'));

        $IOHelper->newLine();
        $IOHelper->success('The changelog was generated successfully');
        $IOHelper->note($target);

        return self::SUCCESS;
    }

    
class ChangelogParser
{
    public function parse(string $content): ChangelogDefinition
    {
        $content = trim($content);

        return (new ChangelogDefinition())
            ->setTitle($this->parseMetadata($content, 'title') ?: '')
            ->setIssue($this->parseMetadata($content, 'issue') ?: '')
            ->setFlag($this->parseMetadata($content, 'flag'))
            ->setAuthor($this->parseMetadata($content, 'author'))
            ->setAuthorEmail($this->parseMetadata($content, 'author_email'))
            ->setAuthorGitHub($this->parseMetadata($content, 'author_github'))
            ->setCore($this->parseSection($content, ChangelogSection::core->value))
            ->setAdministration($this->parseSection($content, ChangelogSection::administration->value))
            ->setStorefront($this->parseSection($content, ChangelogSection::storefront->value))
            ->setApi($this->parseSection($content, ChangelogSection::api->value))
            ->setUpgradeInformation($this->parseSection($content, ChangelogSection::upgrade->value))
            ->setNextMajorVersionChanges($this->parseSection($content, ChangelogSection::major->value));
    }

    /** * Retrieve the metadata of changelog */
Home | Imprint | This part of the site doesn't use cookies.