Skip to content

Commit

Permalink
Merge pull request #19 from artemeon/error-handling
Browse files Browse the repository at this point in the history
Check if mantis issue found
  • Loading branch information
marcreichel authored Feb 18, 2022
2 parents 001e2e4 + 71676ef commit b8f5b6f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Command/CreateGithubIssueFromMantisIssue.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ protected function handle(): int
foreach ($ids as $id) {
$mantisIssue = $this->mantisConnector->readIssue((int)$id);

if (empty($mantisIssue)) {
$issues[] = [
'id' => $id,
'icon' => '<error>✕</error>',
'message' => '<error>Mantis issue not found.</error>',
'issue' => '',
];
continue;
}

if (!empty($mantisIssue->getUpstreamTicket())) {
$issues[] = [
'id' => $id,
Expand Down

0 comments on commit b8f5b6f

Please sign in to comment.