Page MenuHomestyx hydra

No OneTemporary

diff --git a/scripts/__init_env__.php b/scripts/__init_env__.php
index faf5fedcea..1089069377 100644
--- a/scripts/__init_env__.php
+++ b/scripts/__init_env__.php
@@ -1,42 +1,44 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
$include_path = ini_get('include_path');
ini_set('include_path', $include_path.':'.dirname(__FILE__).'/../../');
require_once dirname(dirname(__FILE__)).'/conf/__init_conf__.php';
$env = isset($_SERVER['PHABRICATOR_ENV'])
? $_SERVER['PHABRICATOR_ENV']
: getenv('PHABRICATOR_ENV');
if (!$env) {
echo "Define PHABRICATOR_ENV before running this script.\n";
exit(1);
}
$conf = phabricator_read_config_file($env);
$conf['phabricator.env'] = $env;
phutil_require_module('phabricator', 'infrastructure/env');
PhabricatorEnv::setEnvConfig($conf);
phutil_load_library('arcanist/src');
foreach (PhabricatorEnv::getEnvConfig('load-libraries') as $library) {
phutil_load_library($library);
}
+
+PhutilErrorHandler::initialize();
diff --git a/src/applications/conduit/method/differential/find/ConduitAPI_differential_find_Method.php b/src/applications/conduit/method/differential/find/ConduitAPI_differential_find_Method.php
index 1671c6ff83..9983150496 100644
--- a/src/applications/conduit/method/differential/find/ConduitAPI_differential_find_Method.php
+++ b/src/applications/conduit/method/differential/find/ConduitAPI_differential_find_Method.php
@@ -1,84 +1,86 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class ConduitAPI_differential_find_Method extends ConduitAPIMethod {
public function getMethodDescription() {
return "Query Differential revisions which match certain criteria.";
}
public function defineParamTypes() {
$types = array(
DifferentialRevisionListData::QUERY_OPEN_OWNED,
DifferentialRevisionListData::QUERY_COMMITTABLE,
DifferentialRevisionListData::QUERY_REVISION_IDS,
DifferentialRevisionListData::QUERY_PHIDS,
);
$types = implode(', ', $types);
return array(
'query' => 'required enum<'.$types.'>',
'guids' => 'required nonempty list<guids>',
);
}
public function defineReturnType() {
return 'nonempty list<dict>';
}
public function defineErrorTypes() {
return array(
);
}
protected function execute(ConduitAPIRequest $request) {
$query = $request->getValue('query');
$guids = $request->getValue('guids');
$results = array();
if (!$guids) {
return $results;
}
$revisions = id(new DifferentialRevisionListData(
$query,
(array)$guids))
->loadRevisions();
foreach ($revisions as $revision) {
$diff = $revision->loadActiveDiff();
if (!$diff) {
continue;
}
+ $id = $revision->getID();
$results[] = array(
- 'id' => $revision->getID(),
+ 'id' => $id,
'phid' => $revision->getPHID(),
'name' => $revision->getTitle(),
+ 'uri' => PhabricatorEnv::getProductionURI('/D'.$id),
'dateCreated' => $revision->getDateCreated(),
'authorPHID' => $revision->getAuthorPHID(),
'statusName' => DifferentialRevisionStatus::getNameForRevisionStatus(
$revision->getStatus()),
'sourcePath' => $diff->getSourcePath(),
);
}
return $results;
}
}
diff --git a/src/applications/conduit/method/differential/find/__init__.php b/src/applications/conduit/method/differential/find/__init__.php
index 872766e494..f468d032ec 100644
--- a/src/applications/conduit/method/differential/find/__init__.php
+++ b/src/applications/conduit/method/differential/find/__init__.php
@@ -1,16 +1,17 @@
<?php
/**
* This file is automatically generated. Lint this module to rebuild it.
* @generated
*/
phutil_require_module('phabricator', 'applications/conduit/method/base');
phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus');
phutil_require_module('phabricator', 'applications/differential/data/revisionlist');
+phutil_require_module('phabricator', 'infrastructure/env');
phutil_require_module('phutil', 'utils');
phutil_require_source('ConduitAPI_differential_find_Method.php');
diff --git a/src/applications/conduit/method/diffusion/getcommits/ConduitAPI_diffusion_getcommits_Method.php b/src/applications/conduit/method/diffusion/getcommits/ConduitAPI_diffusion_getcommits_Method.php
index 511fc47cfa..29800e95de 100644
--- a/src/applications/conduit/method/diffusion/getcommits/ConduitAPI_diffusion_getcommits_Method.php
+++ b/src/applications/conduit/method/diffusion/getcommits/ConduitAPI_diffusion_getcommits_Method.php
@@ -1,265 +1,270 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class ConduitAPI_diffusion_getcommits_Method extends ConduitAPIMethod {
public function getMethodDescription() {
return "Retrieve Diffusion commit information.";
}
public function defineParamTypes() {
return array(
'commits' => 'required list<string>',
);
}
public function defineReturnType() {
return 'nonempty list<dict<string, wild>>';
}
public function defineErrorTypes() {
return array(
);
}
protected function execute(ConduitAPIRequest $request) {
$results = array();
$commits = $request->getValue('commits');
$commits = array_fill_keys($commits, array());
foreach ($commits as $name => $info) {
$matches = null;
if (!preg_match('/^r([A-Z]+)([0-9a-f]+)$/', $name, $matches)) {
$results[$name] = array(
'error' => 'ERR-UNPARSEABLE',
);
unset($commits[$name]);
continue;
}
$commits[$name] = array(
'callsign' => $matches[1],
'commitIdentifier' => $matches[2],
);
}
if (!$commits) {
return $results;
}
$callsigns = ipull($commits, 'callsign');
$callsigns = array_unique($callsigns);
$repos = id(new PhabricatorRepository())->loadAllWhere(
'callsign IN (%Ls)',
$callsigns);
$repos = mpull($repos, null, 'getCallsign');
foreach ($commits as $name => $info) {
$repo = idx($repos, $info['callsign']);
if (!$repo) {
$results[$name] = $info + array(
'error' => 'ERR-UNKNOWN-REPOSITORY',
);
unset($commits[$name]);
continue;
}
$commits[$name] += array(
'repositoryPHID' => $repo->getPHID(),
'repositoryID' => $repo->getID(),
);
}
if (!$commits) {
return $results;
}
// Execute a complicated query to figure out the primary commit information
// for each referenced commit.
$cdata = $this->queryCommitInformation($commits, $repos);
// We've built the queries so that each row also has the identifier we used
// to select it, which might be a git prefix rather than a full identifier.
$ref_map = ipull($cdata, 'commitIdentifier', 'commitRef');
$cobjs = id(new PhabricatorRepositoryCommit())->loadAllFromArray($cdata);
$cobjs = mgroup($cobjs, 'getRepositoryID', 'getCommitIdentifier');
foreach ($commits as $name => $commit) {
// Expand short git names into full identifiers. For SVN this map is just
// the identity.
$full_identifier = idx($ref_map, $commit['commitIdentifier']);
$repo_id = $commit['repositoryID'];
unset($commits[$name]['repositoryID']);
if (empty($full_identifier) ||
empty($cobjs[$commit['repositoryID']][$full_identifier])) {
$results[$name] = $commit + array(
'error' => 'ERR-UNKNOWN-COMMIT',
);
unset($commits[$name]);
continue;
}
$cobj_arr = $cobjs[$commit['repositoryID']][$full_identifier];
$cobj = head($cobj_arr);
$commits[$name] += array(
'epoch' => $cobj->getEpoch(),
'commitPHID' => $cobj->getPHID(),
'commitID' => $cobj->getID(),
);
// Upgrade git short references into full commit identifiers.
- $commits[$name]['commitIdentifier'] = $cobj->getCommitIdentifier();
+ $identifier = $cobj->getCommitIdentifier();
+ $commits[$name]['commitIdentifier'] = $identifier;
+
+ $callsign = $commits[$name]['callsign'];
+ $uri = "/r{$callsign}{$identifier}";
+ $commits[$name]['uri'] = PhabricatorEnv::getProductionURI($uri);
}
if (!$commits) {
return $results;
}
$commits = $this->addRepositoryCommitDataInformation($commits);
$commits = $this->addDifferentialInformation($commits);
foreach ($commits as $name => $commit) {
$results[$name] = $commit;
}
return $results;
}
/**
* Retrieve primary commit information for all referenced commits.
*/
private function queryCommitInformation(array $commits, array $repos) {
$conn_r = id(new PhabricatorRepositoryCommit())->establishConnection('r');
$repos = mpull($repos, null, 'getID');
$groups = array();
foreach ($commits as $name => $commit) {
$groups[$commit['repositoryID']][] = $commit['commitIdentifier'];
}
// NOTE: MySQL goes crazy and does a massive table scan if we build a more
// sensible version of this query. Make sure the query plan is OK if you
// attempt to reduce the craziness here. METANOTE: The addition of prefix
// selection for Git further complicates matters.
$query = array();
$commit_table = id(new PhabricatorRepositoryCommit())->getTableName();
foreach ($groups as $repository_id => $identifiers) {
$vcs = $repos[$repository_id]->getVersionControlSystem();
$is_git = ($vcs == PhabricatorRepositoryType::REPOSITORY_TYPE_GIT);
if ($is_git) {
foreach ($identifiers as $identifier) {
if (strlen($identifier) < 7) {
// Don't bother with silly stuff like 'rX2', which will select
// 1/16th of all commits. Note that with length 7 we'll still get
// collisions in repositories at the tens-of-thousands-of-commits
// scale.
continue;
}
$query[] = qsprintf(
$conn_r,
'SELECT %T.*, %s commitRef
FROM %T WHERE repositoryID = %d
AND commitIdentifier LIKE %>',
$commit_table,
$identifier,
$commit_table,
$repository_id,
$identifier);
}
} else {
$query[] = qsprintf(
$conn_r,
'SELECT %T.*, commitIdentifier commitRef
FROM %T WHERE repositoryID = %d
AND commitIdentifier IN (%Ls)',
$commit_table,
$commit_table,
$repository_id,
$identifiers);
}
}
return queryfx_all(
$conn_r,
'%Q',
implode(' UNION ALL ', $query));
}
/**
* Enhance the commit list with RepositoryCommitData information.
*/
private function addRepositoryCommitDataInformation(array $commits) {
$commit_ids = ipull($commits, 'commitID');
$data = id(new PhabricatorRepositoryCommitData())->loadAllWhere(
'commitID in (%Ld)',
$commit_ids);
$data = mpull($data, null, 'getCommitID');
foreach ($commits as $name => $commit) {
if (isset($data[$commit['commitID']])) {
$dobj = $data[$commit['commitID']];
$commits[$name] += array(
'commitMessage' => $dobj->getCommitMessage(),
'commitDetails' => $dobj->getCommitDetails(),
);
}
// Remove this information so we don't expose it via the API since
// external services shouldn't be storing internal Commit IDs.
unset($commits[$name]['commitID']);
}
return $commits;
}
/**
* Enhance the commit list with Differential information.
*/
private function addDifferentialInformation(array $commits) {
$commit_phids = ipull($commits, 'commitPHID');
$rev_conn_r = id(new DifferentialRevision())->establishConnection('r');
$revs = queryfx_all(
$rev_conn_r,
'SELECT r.id id, r.phid phid, c.commitPHID commitPHID FROM %T r JOIN %T c
ON r.id = c.revisionID
WHERE c.commitPHID in (%Ls)',
id(new DifferentialRevision())->getTableName(),
DifferentialRevision::TABLE_COMMIT,
$commit_phids);
$revs = ipull($revs, null, 'commitPHID');
foreach ($commits as $name => $commit) {
if (isset($revs[$commit['commitPHID']])) {
$rev = $revs[$commit['commitPHID']];
$commits[$name] += array(
'differentialRevisionID' => 'D'.$rev['id'],
'differentialRevisionPHID' => $rev['phid'],
);
}
}
return $commits;
}
}
diff --git a/src/applications/conduit/method/diffusion/getcommits/__init__.php b/src/applications/conduit/method/diffusion/getcommits/__init__.php
index d20db59423..27e8490a51 100644
--- a/src/applications/conduit/method/diffusion/getcommits/__init__.php
+++ b/src/applications/conduit/method/diffusion/getcommits/__init__.php
@@ -1,21 +1,22 @@
<?php
/**
* This file is automatically generated. Lint this module to rebuild it.
* @generated
*/
phutil_require_module('phabricator', 'applications/conduit/method/base');
phutil_require_module('phabricator', 'applications/differential/storage/revision');
phutil_require_module('phabricator', 'applications/repository/constants/repositorytype');
phutil_require_module('phabricator', 'applications/repository/storage/commit');
phutil_require_module('phabricator', 'applications/repository/storage/commitdata');
phutil_require_module('phabricator', 'applications/repository/storage/repository');
+phutil_require_module('phabricator', 'infrastructure/env');
phutil_require_module('phabricator', 'storage/qsprintf');
phutil_require_module('phabricator', 'storage/queryfx');
phutil_require_module('phutil', 'utils');
phutil_require_source('ConduitAPI_diffusion_getcommits_Method.php');
diff --git a/src/infrastructure/daemon/irc/bot/PhabricatorIRCBot.php b/src/infrastructure/daemon/irc/bot/PhabricatorIRCBot.php
index 66f13db382..3fd7acb40f 100644
--- a/src/infrastructure/daemon/irc/bot/PhabricatorIRCBot.php
+++ b/src/infrastructure/daemon/irc/bot/PhabricatorIRCBot.php
@@ -1,231 +1,233 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Simple IRC bot which runs as a Phabricator daemon. Although this bot is
* somewhat useful, it is also intended to serve as a demo of how to write
* "system agents" which communicate with Phabricator over Conduit, so you can
* script system interactions and integrate with other systems.
*
* NOTE: This is super janky and experimental right now.
*
* @group irc
*/
final class PhabricatorIRCBot extends PhabricatorDaemon {
private $socket;
private $handlers;
private $writeBuffer;
private $readBuffer;
private $conduit;
public function run() {
$argv = $this->getArgv();
if (count($argv) !== 1) {
throw new Exception("usage: PhabricatorIRCBot <json_config_file>");
}
$json_raw = Filesystem::readFile($argv[0]);
$config = json_decode($json_raw, true);
if (!is_array($config)) {
throw new Exception("File '{$argv[0]}' is not valid JSON!");
}
$server = idx($config, 'server');
$port = idx($config, 'port', 6667);
$join = idx($config, 'join', array());
$handlers = idx($config, 'handlers', array());
$nick = idx($config, 'nick', 'phabot');
if (!preg_match('/^[A-Za-z0-9_]+$/', $nick)) {
throw new Exception(
"Nickname '{$nick}' is invalid, must be alphanumeric!");
}
if (!$join) {
throw new Exception("No channels to 'join' in config!");
}
foreach ($handlers as $handler) {
$obj = newv($handler, array($this));
$this->handlers[] = $obj;
}
$conduit_uri = idx($config, 'conduit.uri');
if ($conduit_uri) {
$conduit_user = idx($config, 'conduit.user');
$conduit_cert = idx($config, 'conduit.cert');
$conduit = new ConduitClient($conduit_uri);
$response = $conduit->callMethodSynchronous(
'conduit.connect',
array(
'client' => 'PhabricatorIRCBot',
'clientVersion' => '1.0',
'clientDescription' => php_uname('n').':'.$nick,
'user' => $conduit_user,
'certificate' => $conduit_cert,
));
$this->conduit = $conduit;
}
$errno = null;
$error = null;
$socket = fsockopen($server, $port, $errno, $error);
if (!$socket) {
throw new Exception("Failed to connect, #{$errno}: {$error}");
}
$ok = stream_set_blocking($socket, false);
if (!$ok) {
throw new Exception("Failed to set stream nonblocking.");
}
$this->socket = $socket;
$this->writeCommand('USER', "{$nick} 0 * :{$nick}");
$this->writeCommand('NICK', "{$nick}");
foreach ($join as $channel) {
$this->writeCommand('JOIN', "{$channel}");
}
$this->runSelectLoop();
}
private function runSelectLoop() {
do {
+ $this->stillWorking();
+
$read = array($this->socket);
if (strlen($this->writeBuffer)) {
$write = array($this->socket);
} else {
$write = array();
}
$except = array();
$ok = @stream_select($read, $write, $except, $timeout_sec = 1);
if ($ok === false) {
throw new Exception(
"socket_select() failed: ".socket_strerror(socket_last_error()));
}
if ($read) {
do {
$data = fread($this->socket, 4096);
if ($data === false) {
throw new Exception("fread() failed!");
} else {
$this->debugLog(true, $data);
$this->readBuffer .= $data;
}
} while (strlen($data));
}
if ($write) {
do {
$len = fwrite($this->socket, $this->writeBuffer);
if ($len === false) {
throw new Exception("fwrite() failed!");
} else {
$this->debugLog(false, substr($this->writeBuffer, 0, $len));
$this->writeBuffer = substr($this->writeBuffer, $len);
}
} while (strlen($this->writeBuffer));
}
do {
$routed_message = $this->processReadBuffer();
} while ($routed_message);
} while (true);
}
private function write($message) {
$this->writeBuffer .= $message;
return $this;
}
public function writeCommand($command, $message) {
return $this->write($command.' '.$message."\r\n");
}
private function processReadBuffer() {
$until = strpos($this->readBuffer, "\r\n");
if ($until === false) {
return false;
}
$message = substr($this->readBuffer, 0, $until);
$this->readBuffer = substr($this->readBuffer, $until + 2);
$pattern =
'/^'.
'(?:(?P<sender>:(\S+)) )?'. // This may not be present.
'(?P<command>[A-Z0-9]+) '.
'(?P<data>.*)'.
'$/';
$matches = null;
if (!preg_match($pattern, $message, $matches)) {
throw new Exception("Unexpected message from server: {$message}");
}
$irc_message = new PhabricatorIRCMessage(
idx($matches, 'sender'),
$matches['command'],
$matches['data']);
$this->routeMessage($irc_message);
return true;
}
private function routeMessage(PhabricatorIRCMessage $message) {
foreach ($this->handlers as $handler) {
try {
$handler->receiveMessage($message);
} catch (Exception $ex) {
phlog($ex);
}
}
}
public function __destroy() {
$this->write("QUIT Goodbye.\r\n");
fclose($this->socket);
}
private function debugLog($is_read, $message) {
echo $is_read ? '<<< ' : '>>> ';
echo addcslashes($message, "\0..\37\177..\377");
echo "\n";
}
public function getConduit() {
if (empty($this->conduit)) {
throw new Exception(
"This bot is not configured with a Conduit uplink. Set 'conduit.uri', ".
"'conduit.user' and 'conduit.cert' in the configuration to connect.");
}
return $this->conduit;
}
}
diff --git a/src/infrastructure/daemon/irc/handler/objectname/PhabricatorIRCObjectNameHandler.php b/src/infrastructure/daemon/irc/handler/objectname/PhabricatorIRCObjectNameHandler.php
index 5da7bfceb1..0851e426e0 100644
--- a/src/infrastructure/daemon/irc/handler/objectname/PhabricatorIRCObjectNameHandler.php
+++ b/src/infrastructure/daemon/irc/handler/objectname/PhabricatorIRCObjectNameHandler.php
@@ -1,62 +1,114 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Looks for Dxxxx, Txxxx and links to them.
*
* @group irc
*/
class PhabricatorIRCObjectNameHandler extends PhabricatorIRCHandler {
public function receiveMessage(PhabricatorIRCMessage $message) {
switch ($message->getCommand()) {
case 'PRIVMSG':
$channel = $message->getChannel();
if (!$channel) {
break;
}
$message = $message->getMessageText();
$matches = null;
$phids = array();
- if (preg_match_all('/(?:^|\b)D(\d+)(?:\b|$)/', $message, $matches)) {
- if ($matches[1]) {
- $revisions = $this->getConduit()->callMethodSynchronous(
- 'differential.find',
- array(
- 'query' => 'revision-ids',
- 'guids' => $matches[1],
- ));
-
- // TODO: This is utter hacks until phid.find or similar lands.
- foreach ($revisions as $revision) {
- $phids[$revision['phid']] =
- 'D'.$revision['id'].' '.$revision['name'].' - '.
- PhabricatorEnv::getProductionURI('/D'.$revision['id']);
+
+ $pattern =
+ '@'.
+ '(?<!/)(?:^|\b)'. // Negative lookbehind prevent matching "/D123".
+ '(D|T)(\d+)'.
+ '(?:\b|$)'.
+ '@';
+
+ $revision_ids = array();
+ $task_ids = array();
+ $commit_names = array();
+
+ if (preg_match_all($pattern, $message, $matches, PREG_SET_ORDER)) {
+ foreach ($matches as $match) {
+ switch ($match[1]) {
+ case 'D':
+ $revision_ids[] = $match[2];
+ break;
+ case 'T':
+ $task_ids[] = $match[2];
+ break;
+ }
+ }
+ }
+
+ $pattern =
+ '@'.
+ '(?<!/)(?:^|\b)'.
+ '(r[A-Z]+[0-9a-z]{1,40})'.
+ '(?:\b|$)'.
+ '@';
+ if (preg_match_all($pattern, $message, $matches, PREG_SET_ORDER)) {
+ foreach ($matches as $match) {
+ $commit_names[] = $match[1];
+ }
+ }
+
+ $output = array();
+
+ if ($revision_ids) {
+ $revisions = $this->getConduit()->callMethodSynchronous(
+ 'differential.find',
+ array(
+ 'query' => 'revision-ids',
+ 'guids' => $revision_ids,
+ ));
+ foreach ($revisions as $revision) {
+ $output[] =
+ 'D'.$revision['id'].' '.$revision['name'].' - '.
+ $revision['uri'];
+ }
+ }
+
+ // TODO: Support tasks in Conduit.
+
+ if ($commit_names) {
+ $commits = $this->getConduit()->callMethodSynchronous(
+ 'diffusion.getcommits',
+ array(
+ 'commits' => $commit_names,
+ ));
+ foreach ($commits as $commit) {
+ if (isset($commit['error'])) {
+ continue;
}
+ $output[] = $commit['uri'];
}
}
- foreach ($phids as $phid => $description) {
+
+ foreach ($output as $description) {
$this->write('PRIVMSG', "{$channel} :{$description}");
}
break;
}
}
}
diff --git a/src/infrastructure/daemon/irc/handler/objectname/__init__.php b/src/infrastructure/daemon/irc/handler/objectname/__init__.php
index fe1f69ba65..1b2f54cc85 100644
--- a/src/infrastructure/daemon/irc/handler/objectname/__init__.php
+++ b/src/infrastructure/daemon/irc/handler/objectname/__init__.php
@@ -1,13 +1,12 @@
<?php
/**
* This file is automatically generated. Lint this module to rebuild it.
* @generated
*/
phutil_require_module('phabricator', 'infrastructure/daemon/irc/handler/base');
-phutil_require_module('phabricator', 'infrastructure/env');
phutil_require_source('PhabricatorIRCObjectNameHandler.php');

File Metadata

Mime Type
text/x-diff
Expires
Tue, Dec 2, 9:24 AM (15 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
431786
Default Alt Text
(27 KB)

Event Timeline