Page MenuHomePhabricator

final class PhabricatorBot
Phabricator Technical Documentation (Daemons)

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.

Methods

protected function willRun()
Inherited

This method is not documented.
Return
wild

protected function willSleep($duration)
Inherited

This method is not documented.
Parameters
$duration
Return
wild

public function getViewer()
Inherited

This method is not documented.
Return
wild

public static function sudoCommandAsDaemonUser($command)
Inherited

PhabricatorDaemon

Format a command so it executes as the daemon user, if a daemon user is defined. This wraps the provided command in sudo -u ..., roughly.

Parameters
PhutilCommandString$commandCommand to execute.
Return
PhutilCommandString`sudo` version of the command.

protected function run()

This method is not documented.
Return
wild

public function getConfig($key, $default)

This method is not documented.
Parameters
$key
$default
Return
wild

private function runLoop()

This method is not documented.
Return
wild

public function writeMessage($message)

This method is not documented.
Parameters
PhabricatorBotMessage$message
Return
wild

private function routeMessage($message)

This method is not documented.
Parameters
PhabricatorBotMessage$message
Return
wild

public function getAdapter()

This method is not documented.
Return
wild

public function getConduit()

This method is not documented.
Return
wild