Skip to content

Commit

Permalink
Update PullRequestMergeCommand::execute()
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Mar 4, 2017
1 parent a6bdd79 commit 341830d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Command/PullRequest/PullRequestMergeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

// Post merge options
if ($pr['user'] === $authenticatedUser) {
if (!$input->getOption('no-remove-source-branch') && 'yes' === $this->getHelper('gush_style')->choice('Delete source branch?', ['yes', 'no'], 'no')) {
if ($removeSourceBranch || (!$input->getOption('no-remove-source-branch') && 'yes' === $this->getHelper('gush_style')->choice('Delete source branch?', ['yes', 'no'], 'no'))) {
$adapter->removePullRequestSourceBranch($pr['number']);
$styleHelper->note(sprintf('Remote source branch %s:%s has been removed.', $sourceRemote, $sourceBranch));
}
Expand Down

0 comments on commit 341830d

Please sign in to comment.