From 2728a41fa06f0df94441571a50cb7aa0f303a1ce Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 29 Jun 2011 03:32:19 -0400 Subject: [PATCH] Make phabot understand Txxx. Summary: Maniphest tasks can now be summarized by referencing their respective T in irc. Test Plan: 03:29:28 <@CodeBlock> T218 03:29:29 <@codeblock-phabot> T218: NYANCAT (Priority: Wishlist) - https://secure.phabricator.com/T218 03:30:14 <@CodeBlock> T58 asdf foo bar baz mcFoo T163 03:30:15 <@codeblock-phabot> T58: Allow AphrontFormView to render as a
instead of a form (Priority: Wishlist) - https://secure.phabricator.com/T58 03:30:15 <@codeblock-phabot> T163: arc amend is slow (Priority: Needs Triage) - https://secure.phabricator.com/T163 ... 03:28:23 <@CodeBlock> Oh. Hah, I'm testing against production Conduit. Ah well. 03:28:40 <@CodeBlock> I don't always test my code...but when I do, I do it in prod! :D Reviewers: epriestley CC: Differential Revision: 551 --- .../objectname/PhabricatorIRCObjectNameHandler.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/daemon/irc/handler/objectname/PhabricatorIRCObjectNameHandler.php b/src/infrastructure/daemon/irc/handler/objectname/PhabricatorIRCObjectNameHandler.php index 0629c06df8..312ea02ffe 100644 --- a/src/infrastructure/daemon/irc/handler/objectname/PhabricatorIRCObjectNameHandler.php +++ b/src/infrastructure/daemon/irc/handler/objectname/PhabricatorIRCObjectNameHandler.php @@ -94,7 +94,17 @@ class PhabricatorIRCObjectNameHandler extends PhabricatorIRCHandler { } } - // TODO: Support tasks in Conduit. + if ($task_ids) { + foreach ($task_ids as $task_id) { + $task = $this->getConduit()->callMethodSynchronous( + 'maniphest.info', + array( + 'task_id' => $task_id, + )); + $output[$task['phid']] = 'T'.$task['id'].': '.$task['title']. + ' (Priority: '.$task['priority'].') - '.$task['uri']; + } + } if ($commit_names) { $commits = $this->getConduit()->callMethodSynchronous(