Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15426847
D13879.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13879.diff
View Options
diff --git a/src/workflow/ArcanistListWorkflow.php b/src/workflow/ArcanistListWorkflow.php
--- a/src/workflow/ArcanistListWorkflow.php
+++ b/src/workflow/ArcanistListWorkflow.php
@@ -36,7 +36,21 @@
return true;
}
+ public function getArguments() {
+ return array(
+ 'owner' => array(
+ 'param' => 'username',
+ 'paramtype' => 'username',
+ 'help' => pht(
+ 'Only show tasks assigned to the given username, '.
+ 'also accepts %s to show all, default is you.',
+ '@all'),
+ ),
+ );
+ }
+
public function run() {
+ $owner = $this->getArgument('owner');
static $color_map = array(
'Closed' => 'cyan',
'Needs Review' => 'magenta',
@@ -47,10 +61,17 @@
'Abandoned' => 'default',
);
+ if ($owner) {
+ $owner_phid = $this->findOwnerPHID($owner);
+ } else {
+ $owner_phid = $this->getUserPHID();
+ }
+
+
$revisions = $this->getConduit()->callMethodSynchronous(
'differential.query',
array(
- 'authors' => array($this->getUserPHID()),
+ 'authors' => array($owner_phid),
'status' => 'status-open',
));
@@ -106,4 +127,21 @@
return 0;
}
+private function findOwnerPHID($owner) {
+ $conduit = $this->getConduit();
+
+ $users = $conduit->callMethodSynchronous(
+ 'user.query',
+ array(
+ 'usernames' => array($owner),
+ ));
+
+ if (!$users) {
+ return null;
+ }
+
+ $user = head($users);
+ return idx($user, 'phid');
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 24, 11:08 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705182
Default Alt Text
D13879.diff (1 KB)
Attached To
Mode
D13879: Allow `arc list` to show other users diffs.
Attached
Detach File
Event Timeline
Log In to Comment