Gush\Command\Branch\BranchChangelogCommand::configure PHP Method

configure() protected method

protected configure ( )
    protected function configure()
    {
        $this->setName('branch:changelog')->setDescription('Reports what got fixed or closed since last release on the given branch')->addArgument('branch', InputArgument::OPTIONAL, 'Branch to look for tags in. When unspecified, the current branch is used')->addOption('search', 's', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Regex pattern to use for searching', ['/#(?P<id>[0-9]+)/i'])->setHelp(<<<EOF
Reports what got fixed or closed since the last release on the given branch.

    <info>\$ gush %command.name%</info>

This command will search all the commits in the given branch (that were made after the last tag)
and will try to extract the issue numbers from the message. To only match a precise pattern, use the
<comment>--search</comment> option to specify one or multiple regex-patterns (with delimiters and flags).

For example, if your issues are prefixed with "DC-", use the following:

    <info>\$ gush %command.name% --search="{DC-(?P<id>[0-9]+)}i"</info>

Note: It's important the regex has a "named capturing group" identified by "id" like <comment>(?P<id>[0-9]+)</comment>.
This named group must (only) match the issue number and nothing else.

To learn more about composing your own regex patterns see:
http://php.net/manual/reference.pcre.pattern.syntax.php
http://www.regular-expressions.info/
EOF
);
    }