Remove all "Phabricator Bot" code
Summary: Closes T7829 as wontfix. Closes T7965 as wontfix. Closes T7800 as wontfix. Closes T2731 as wontfix. Closes T1271 as wontfix. We aren't maintaining this at all (see, e.g., T7829) and a user reported a technically accurate security issue via HackerOne: <https://hackerone.com/reports/222870> Just throw it away until we get to the eventual Conphernece bot/API update and can do this stuff correctly. Test Plan: Grepped for `phabricatorbot`. Reviewers: chad Reviewed By: chad Maniphest Tasks: T7965, T7829, T7800, T2731, T1271 Differential Revision: https://secure.phabricator.com/D17756
This commit is contained in:
@@ -1,87 +0,0 @@
|
||||
@title Chat Bot Technical Documentation
|
||||
@group bot
|
||||
|
||||
Configuring and extending the chat bot.
|
||||
|
||||
= Overview =
|
||||
|
||||
Phabricator includes a simple chat bot daemon, which is primarily intended as
|
||||
an example of how you can write an external script that interfaces with
|
||||
Phabricator over Conduit and does some kind of useful work. If you use IRC or
|
||||
another supported chat protocol, you can also have the bot hang out in your
|
||||
channel.
|
||||
|
||||
NOTE: The chat bot is somewhat experimental and not very mature.
|
||||
|
||||
= Configuring the Bot =
|
||||
|
||||
The bot reads a JSON configuration file. You can find an example in:
|
||||
|
||||
resources/chatbot/example_config.json
|
||||
|
||||
These are the configuration values it reads:
|
||||
|
||||
- `server` String, required, the server to connect to.
|
||||
- `port` Int, optional, the port to connect to (defaults to 6667).
|
||||
- `ssl` Bool, optional, whether to connect via SSL or not (defaults to
|
||||
false).
|
||||
- `nick` String, nickname to use.
|
||||
- `user` String, optional, username to use (defaults to `nick`).
|
||||
- `pass` String, optional, password for server.
|
||||
- `nickpass` String, optional, password for NickServ.
|
||||
- `join` Array, list of channels to join.
|
||||
- `handlers` Array, list of handlers to run. These are like plugins for the
|
||||
bot.
|
||||
- `conduit.uri`, `conduit.token` Conduit configuration,
|
||||
see below.
|
||||
- `notification.channels` Notification configuration, see below.
|
||||
|
||||
= Handlers =
|
||||
|
||||
You specify a list of "handlers", which are basically plugins or modules for
|
||||
the bot. These are the default handlers available:
|
||||
|
||||
- @{class:PhabricatorBotObjectNameHandler} This handler looks for users
|
||||
mentioning Phabricator objects like "T123" and "D345" in chat, looks them
|
||||
up, and says their name with a link to the object. Requires conduit.
|
||||
- @{class:PhabricatorBotFeedNotificationHandler} This handler posts
|
||||
notifications about changes to revisions to the channels listed in
|
||||
`notification.channels`.
|
||||
- @{class:PhabricatorBotLogHandler} This handler records chatlogs which can
|
||||
be browsed in the Phabricator web interface.
|
||||
- @{class:PhabricatorBotSymbolHandler} This handler posts responses to lookups
|
||||
for symbols in Diffusion
|
||||
- @{class:PhabricatorBotMacroHandler} This handler looks for users mentioning
|
||||
macros, if found will convert image to ASCII and output in chat. Configure
|
||||
with `macro.size` and `macro.aspect`
|
||||
|
||||
You can also write your own handlers, by extending
|
||||
@{class:PhabricatorBotHandler}.
|
||||
|
||||
= Conduit =
|
||||
|
||||
Some handlers (e.g., @{class:PhabricatorBotObjectNameHandler}) need to read data
|
||||
from Phabricator over Conduit, Phabricator's HTTP API. You can use this method
|
||||
to allow other scripts or programs to access Phabricator's data from different
|
||||
servers and in different languages.
|
||||
|
||||
To allow the bot to access Conduit, you need to create a user that it can login
|
||||
with. To do this, login to Phabricator as an administrator and go to
|
||||
`People -> Create New Account`. Create a new account and flag them as a
|
||||
"Bot/Script". Then in your configuration file, set these parameters:
|
||||
|
||||
- `conduit.uri` The URI for your Phabricator install, like
|
||||
`http://phabricator.example.com/`
|
||||
- `conduit.token` The user's conduit API token, from the "Conduit API Tokens"
|
||||
tab in the user's administrative view.
|
||||
|
||||
Now the bot should be able to connect to Phabricator via Conduit.
|
||||
|
||||
= Starting the Bot =
|
||||
|
||||
The bot is a Phabricator daemon, so start it with `phd`:
|
||||
|
||||
./bin/phd launch phabricatorbot <absolute_path_to_config_file>
|
||||
|
||||
If you have issues you can try `debug` instead of `launch`, see
|
||||
@{article:Managing Daemons with phd} for more information.
|
||||
Reference in New Issue
Block a user