Skip to content

BLT-5222: [push:artifact] Add no-clone / no-commit #1895

BLT-5222: [push:artifact] Add no-clone / no-commit

BLT-5222: [push:artifact] Add no-clone / no-commit #1895

Triggered via pull request October 20, 2023 22:07
Status Success
Total duration 5m 56s
Artifacts

mutation.yml

on: pull_request
Mutation Testing
5m 44s
Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

9 warnings
Mutation Testing: src/Command/Push/PushArtifactCommand.php#L68
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ } protected function commandRequiresAuthentication() : bool { - return FALSE; + return true; } protected function execute(InputInterface $input, OutputInterface $output) : int {
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#L132
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ $this->commit($outputCallback, $artifactDir, $commitHash); $this->checklist->completePreviousItem(); } - if (!$input->getOption('dry-run') && !$input->getOption('no-push')) { + if (!$input->getOption('dry-run') || !$input->getOption('no-push')) { if ($tagName = $input->getOption('destination-git-tag')) { $this->checklist->addItem("Creating <options=bold>{$tagName}</> tag."); $this->createTag($tagName, $outputCallback, $artifactDir);