Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistTodoWorkflow.php
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | return array( | ||||
'repeat' => true, | 'repeat' => true, | ||||
'help' => pht('Other users to CC on the new task.'), | 'help' => pht('Other users to CC on the new task.'), | ||||
), | ), | ||||
'project' => array( | 'project' => array( | ||||
'param' => 'project', | 'param' => 'project', | ||||
'repeat' => true, | 'repeat' => true, | ||||
'help' => pht('Projects to assign to the task.'), | 'help' => pht('Projects to assign to the task.'), | ||||
), | ), | ||||
'browse' => array( | |||||
'help' => pht('After creating the task, open it in a web browser.'), | |||||
), | |||||
); | ); | ||||
} | } | ||||
public function run() { | public function run() { | ||||
$summary = implode(' ', $this->getArgument('summary')); | $summary = implode(' ', $this->getArgument('summary')); | ||||
$ccs = $this->getArgument('cc'); | $ccs = $this->getArgument('cc'); | ||||
$slugs = $this->getArgument('project'); | $slugs = $this->getArgument('project'); | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | public function run() { | ||||
} | } | ||||
$result = $conduit->callMethodSynchronous('maniphest.createtask', $args); | $result = $conduit->callMethodSynchronous('maniphest.createtask', $args); | ||||
echo phutil_console_format( | echo phutil_console_format( | ||||
"Created task T%s: '<fg:green>**%s**</fg>' at <fg:blue>**%s**</fg>\n", | "Created task T%s: '<fg:green>**%s**</fg>' at <fg:blue>**%s**</fg>\n", | ||||
$result['id'], | $result['id'], | ||||
$result['title'], | $result['title'], | ||||
$result['uri']); | $result['uri']); | ||||
if ($this->getArgument('browse')) { | |||||
$this->openURIsInBrowser(array($result['uri'])); | |||||
} | |||||
} | } | ||||
} | } |