Skip to content

Commit

Permalink
Merge pull request #24 from artemeon/feat/sync-tickets-multiple-times
Browse files Browse the repository at this point in the history
feat(): Sync tickets multiple times
  • Loading branch information
marcreichel committed May 3, 2023
2 parents 00b6411 + ac618c3 commit 7f3fc45
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/Command/CreateGithubIssueFromMantisIssue.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,6 @@ protected function handle(): int
continue;
}

if (!empty($mantisIssue->getUpstreamTicket())) {
$issues[] = [
'id' => $id,
'icon' => '<comment>!</comment>',
'message' => '<comment>Mantis issue already synchronized.</comment>',
'issue' => $mantisIssue->getUpstreamTicket(),
];
continue;
}

$newGithubIssue = GithubIssue::fromMantisIssue($mantisIssue);

$filteredLabels = array_values(array_filter($labels, function ($label) use ($mantisIssue) {
Expand All @@ -104,7 +94,7 @@ protected function handle(): int
continue;
}

$mantisIssue->setUpstreamTicket($newGithubIssue->getIssueUrl());
$mantisIssue->setUpstreamTicket(trim($mantisIssue->getUpstreamTicket() . ' ' . $newGithubIssue->getIssueUrl()));
$patched = $this->mantisConnector->patchUpstreamField($mantisIssue);

if ($patched === false) {
Expand Down

0 comments on commit 7f3fc45

Please sign in to comment.