BLT-5222: [push:artifact] Add no-clone / no-commit #1908
mutation.yml
on: pull_request
Mutation Testing
2m 17s
Annotations
10 warnings
Mutation Testing:
src/Command/Push/PushArtifactCommand.php#L75
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->setDirAndRequireProjectCwd($input);
if ($input->getOption('no-clone')) {
$input->setOption('no-commit', TRUE);
- $input->setOption('no-push', TRUE);
+
}
if ($input->getOption('no-commit')) {
$input->setOption('no-push', TRUE);
|
Mutation Testing:
src/Command/Push/PushArtifactCommand.php#L75
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
$this->setDirAndRequireProjectCwd($input);
if ($input->getOption('no-clone')) {
$input->setOption('no-commit', TRUE);
- $input->setOption('no-push', TRUE);
+ $input->setOption('no-push', false);
}
if ($input->getOption('no-commit')) {
$input->setOption('no-push', TRUE);
|
Mutation Testing:
src/Command/Push/PushArtifactCommand.php#L101
Escaped Mutant for Mutator "Ternary":
--- Original
+++ New
@@ @@
$destinationGitRef = $this->determineDestinationGitRef();
$sourceGitBranch = $this->determineSourceGitRef();
$destinationGitUrlsString = implode(',', $destinationGitUrls);
- $refType = $this->input->getOption('destination-git-tag') ? 'tag' : 'branch';
+ $refType = $this->input->getOption('destination-git-tag') ? 'branch' : 'tag';
$this->io->note(["Acquia CLI will:", "- git clone {$sourceGitBranch} from {$destinationGitUrls[0]}", "- Compile the contents of {$this->dir} into an artifact in a temporary directory", "- Copy the artifact files into the checked out copy of {$sourceGitBranch}", "- Commit changes and push the {$destinationGitRef} {$refType} to the following git remote(s):", " {$destinationGitUrlsString}"]);
$this->checklist->addItem('Preparing artifact directory');
$this->cloneSourceBranch($outputCallback, $artifactDir, $destinationGitUrls[0], $sourceGitBranch);
|
Mutation Testing:
src/Command/Push/PushArtifactCommand.php#L102
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$sourceGitBranch = $this->determineSourceGitRef();
$destinationGitUrlsString = implode(',', $destinationGitUrls);
$refType = $this->input->getOption('destination-git-tag') ? 'tag' : 'branch';
- $this->io->note(["Acquia CLI will:", "- git clone {$sourceGitBranch} from {$destinationGitUrls[0]}", "- Compile the contents of {$this->dir} into an artifact in a temporary directory", "- Copy the artifact files into the checked out copy of {$sourceGitBranch}", "- Commit changes and push the {$destinationGitRef} {$refType} to the following git remote(s):", " {$destinationGitUrlsString}"]);
+
$this->checklist->addItem('Preparing artifact directory');
$this->cloneSourceBranch($outputCallback, $artifactDir, $destinationGitUrls[0], $sourceGitBranch);
$this->checklist->completePreviousItem();
|
Mutation Testing:
src/Command/Push/PushArtifactCommand.php#L102
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
$sourceGitBranch = $this->determineSourceGitRef();
$destinationGitUrlsString = implode(',', $destinationGitUrls);
$refType = $this->input->getOption('destination-git-tag') ? 'tag' : 'branch';
- $this->io->note(["Acquia CLI will:", "- git clone {$sourceGitBranch} from {$destinationGitUrls[0]}", "- Compile the contents of {$this->dir} into an artifact in a temporary directory", "- Copy the artifact files into the checked out copy of {$sourceGitBranch}", "- Commit changes and push the {$destinationGitRef} {$refType} to the following git remote(s):", " {$destinationGitUrlsString}"]);
+ $this->io->note(["- git clone {$sourceGitBranch} from {$destinationGitUrls[0]}", "- Compile the contents of {$this->dir} into an artifact in a temporary directory", "- Copy the artifact files into the checked out copy of {$sourceGitBranch}", "- Commit changes and push the {$destinationGitRef} {$refType} to the following git remote(s):", " {$destinationGitUrlsString}"]);
$this->checklist->addItem('Preparing artifact directory');
$this->cloneSourceBranch($outputCallback, $artifactDir, $destinationGitUrls[0], $sourceGitBranch);
$this->checklist->completePreviousItem();
|
Mutation Testing:
src/Command/Push/PushArtifactCommand.php#L111
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$destinationGitUrlsString = implode(',', $destinationGitUrls);
$refType = $this->input->getOption('destination-git-tag') ? 'tag' : 'branch';
$this->io->note(["Acquia CLI will:", "- git clone {$sourceGitBranch} from {$destinationGitUrls[0]}", "- Compile the contents of {$this->dir} into an artifact in a temporary directory", "- Copy the artifact files into the checked out copy of {$sourceGitBranch}", "- Commit changes and push the {$destinationGitRef} {$refType} to the following git remote(s):", " {$destinationGitUrlsString}"]);
- $this->checklist->addItem('Preparing artifact directory');
+
$this->cloneSourceBranch($outputCallback, $artifactDir, $destinationGitUrls[0], $sourceGitBranch);
$this->checklist->completePreviousItem();
}
|
Mutation Testing:
src/Command/Push/PushArtifactCommand.php#L113
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->io->note(["Acquia CLI will:", "- git clone {$sourceGitBranch} from {$destinationGitUrls[0]}", "- Compile the contents of {$this->dir} into an artifact in a temporary directory", "- Copy the artifact files into the checked out copy of {$sourceGitBranch}", "- Commit changes and push the {$destinationGitRef} {$refType} to the following git remote(s):", " {$destinationGitUrlsString}"]);
$this->checklist->addItem('Preparing artifact directory');
$this->cloneSourceBranch($outputCallback, $artifactDir, $destinationGitUrls[0], $sourceGitBranch);
- $this->checklist->completePreviousItem();
+
}
$this->checklist->addItem('Generating build artifact');
$this->buildArtifact($outputCallback, $artifactDir);
|
Mutation Testing:
src/Command/Push/PushArtifactCommand.php#L127
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->checklist->completePreviousItem();
}
if (!$input->getOption('no-commit')) {
- $this->checklist->addItem("Committing changes (commit hash: {$commitHash})");
+
$this->commit($outputCallback, $artifactDir, $commitHash);
$this->checklist->completePreviousItem();
}
|
Mutation Testing:
src/Command/Push/PushArtifactCommand.php#L129
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
if (!$input->getOption('no-commit')) {
$this->checklist->addItem("Committing changes (commit hash: {$commitHash})");
$this->commit($outputCallback, $artifactDir, $commitHash);
- $this->checklist->completePreviousItem();
+
}
if (!$input->getOption('dry-run') && !$input->getOption('no-push')) {
if ($tagName = $input->getOption('destination-git-tag')) {
|
Mutation Testing:
src/Command/Push/PushArtifactCommand.php#L147
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
$this->checklist->completePreviousItem();
} else {
- $this->logger->warning("The <options=bold>--dry-run</> (deprecated) or <options=bold>--no-push</> option prevented changes from being pushed to Acquia Cloud. The artifact has been built at <options=bold>{$artifactDir}</>");
+
}
return Command::SUCCESS;
}
|