]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Add a --browse flag to `arc todo`
authorepriestley <git@epriestley.com>
Mon, 4 Aug 2014 19:03:12 +0000 (12:03 -0700)
committerepriestley <git@epriestley.com>
Mon, 4 Aug 2014 19:03:12 +0000 (12:03 -0700)
Summary: Ref T5781. Like D10141, but for `arc todo`. Fixes T5787.

Test Plan: See T5787.

Reviewers: btrahan, csilvers

Reviewed By: csilvers

Subscribers: epriestley, spicyj

Maniphest Tasks: T5781, T5787

Differential Revision: https://secure.phabricator.com/D10142

src/workflow/ArcanistTodoWorkflow.php

index 53aae0ed4554244ea45c395b73ccad535882b5f4..30550e5918a7ea50090630df0f560933eac82c55 100644 (file)
@@ -49,6 +49,9 @@ EOTEXT
         'repeat' => true,
         'help'   => pht('Projects to assign to the task.'),
       ),
+      'browse' => array(
+        'help' => pht('After creating the task, open it in a web browser.'),
+      ),
     );
   }
 
@@ -108,6 +111,11 @@ EOTEXT
       $result['id'],
       $result['title'],
       $result['uri']);
+
+    if ($this->getArgument('browse')) {
+      $this->openURIsInBrowser(array($result['uri']));
+    }
+
   }
 
 }