Skip to content

Commit 2dd1ab5

Browse files
committed
Handle "ticket" can-create action independent of verification
1 parent 0842554 commit 2dd1ab5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Command/Project/ProjectCreateCommand.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,13 @@ private function checkCanCreate(Organization $organization, InputInterface $inpu
363363
$this->stdErr->writeln(sprintf('<info>%s/%s/-/billing</info>', rtrim($consoleUrl, '/'), $organization->name));
364364
return false;
365365
}
366+
if ($consoleUrl && $canCreate['required_action']['action'] === 'ticket') {
367+
$this->stdErr->writeln($canCreate['message']);
368+
$this->stdErr->writeln('');
369+
$this->stdErr->writeln('Please open the following URL in a browser to create a ticket:');
370+
$this->stdErr->writeln(sprintf('<info>%s/support</info>', rtrim($consoleUrl, '/')));
371+
return false;
372+
}
366373
if ($canCreate['required_action']['action'] === 'verification') {
367374
return $this->requireVerification($canCreate['required_action']['type'], $canCreate['message'], $input);
368375
}
@@ -409,7 +416,7 @@ private function requireVerification($type, $message, InputInterface $input)
409416
if ($this->config()->has('service.console_url')) {
410417
$url = $this->config()->get('service.console_url') . '/support';
411418
$this->stdErr->writeln('');
412-
$this->stdErr->writeln('Please open the following URL in a browser to open a ticket:');
419+
$this->stdErr->writeln('Please open the following URL in a browser to create a ticket:');
413420
$this->stdErr->writeln(sprintf('<info>%s</info>', $url));
414421
}
415422
} else {

0 commit comments

Comments
 (0)