dev/src/ReleaseBuilder/ReleaseBuilder.php
private function interactiveCommitRelease(OutputInterface $output, array $commit, array $components)
    {
        $commitRelease = $this->processCommit($output, $commit, $components);

        $proceed = false;
        do {
            $this->displayCommitSummary($output, $commitRelease);

            $output->writeln('');

            $choices = [
                'Proceed without changes',
                'Change Release Message',
                'Change Release Type to Patch',
                'Change Release Type to Minor',
                'Change Release Type to Major',
                'Start over'
            ];
            $q = $this->choice('Choose an action', $choices, $choices[0]);

            $action = $this->askQuestion($q);
            $action = $this->removeDefaultFromChoice($action);

            switch ($action) {
                case $choices[0]:
                    $proceed = true;
                    break;

                case $choices[1]:
                    $commitRelease = $this->handleChange($output, $commitRelease);
                    break;

                case $choices[2]: // patch
                    $commitRelease = $this->handleChange($output, $commitRelease, self::LEVEL_PATCH);
                    break;

                case $choices[3]: // minor
                    $commitRelease = $this->handleChange($output, $commitRelease, self::LEVEL_MINOR);
                    break;

                case $choices[4]: // major
                    $commitRelease = $this->handleChange($output, $commitRelease, self::LEVEL_MAJOR);
                    break;

                case $choices[5]:
                    $commitRelease = $this->processCommit($output, $commit, $components);
                    break;
            }
        } while (!$proceed);

        $output->writeln('');

        return $commitRelease;
    }
private function interactiveCommitRelease(OutputInterface $output, array $commit, array $components)
    {
        $commitRelease = $this->processCommit($output, $commit, $components);

        $proceed = false;
        do {
            $this->displayCommitSummary($output, $commitRelease);

            $output->writeln('');

            $choices = [
                'Proceed without changes',
                'Change Release Message',
                'Change Release Type to Patch',
                'Change Release Type to Minor',
                'Change Release Type to Major',
                'Start over'
            ];
            $q = $this->choice('Choose an action', $choices, $choices[0]);

            $action = $this->askQuestion($q);
            $action = $this->removeDefaultFromChoice($action);

            switch ($action) {
                case $choices[0]:
                    $proceed = true;
                    break;

                case $choices[1]:
                    $commitRelease = $this->handleChange($output, $commitRelease);
                    break;

                case $choices[2]: // patch
                    $commitRelease = $this->handleChange($output, $commitRelease, self::LEVEL_PATCH);
                    break;

                case $choices[3]: // minor
                    $commitRelease = $this->handleChange($output, $commitRelease, self::LEVEL_MINOR);
                    break;

                case $choices[4]: // major
                    $commitRelease = $this->handleChange($output, $commitRelease, self::LEVEL_MAJOR);
                    break;

                case $choices[5]:
                    $commitRelease = $this->processCommit($output, $commit, $components);
                    break;
            }
        } while (!$proceed);

        $output->writeln('');

        return $commitRelease;
    }
private function interactiveCommitRelease ( OutputInterface $ output , array $ commit , array $ components ) { $ commitRelease = $ this -> processCommit ( $ output , $ commit , $ components ) ; $ proceed = false ; do { $ this -> displayCommitSummary ( $ output , $ commitRelease ) ; $ output -> writeln ( '' ) ; $ choices = [ 'Proceed without changes' , 'Change Release Message' , 'Change Release Type to Patch' , 'Change Release Type to Minor' , 'Change Release Type to Major' , 'Start over' ] ; $ q = $ this -> choice ( 'Choose an action' , $ choices , $ choices [ 0 ] ) ; $ action = $ this -> askQuestion ( $ q ) ; $ action = $ this -> removeDefaultFromChoice ( $ action ) ; switch ( $ action ) { case $ choices [ 0 ] : $ proceed = true ; break ; case $ choices [ 1 ] : $ commitRelease = $ this -> handleChange ( $ output , $ commitRelease ) ; break ; case $ choices [ 2 ] : // patch $ commitRelease = $ this -> handleChange ( $ output , $ commitRelease , self :: LEVEL_PATCH ) ; break ; case $ choices [ 3 ] : // minor $ commitRelease = $ this -> handleChange ( $ output , $ commitRelease , self :: LEVEL_MINOR ) ; break ; case $ choices [ 4 ] : // major $ commitRelease = $ this -> handleChange ( $ output , $ commitRelease , self :: LEVEL_MAJOR ) ; break ; case $ choices [ 5 ] : $ commitRelease = $ this -> processCommit ( $ output , $ commit , $ components ) ; break ; } } while ( ! $ proceed ) ; $ output -> writeln ( '' ) ; return $ commitRelease ; }
Determine defaults for components affected by the commit, display an
overview and provide an interface for modifications.

@param OutputInterface $output The Symfony Output for writing to stdout
@param array $commit The commit data.
@param array $components Components modified by the commit.
@return array Structured data about components modified in this commit.
Determine defaults for components affected by the commit display an overview and provide an interface for modifications .