1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Updated the docs so chatbots can use the Conduit API

Summary: Previously, the chatbot docs instructed users to get certificates for the conduit API and put the cert in a `conduit.cert` config key. In order to get the chatbot to work, I needed to instead get an API key and put it in the `conduit.token` config entry.

Test Plan: Doc fix. Tried the new documented way and it worked.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D16443
This commit is contained in:
Josh Cox 2016-08-24 19:00:03 -04:00
parent 2c9a93eda7
commit 8cdf1a890a
3 changed files with 7 additions and 11 deletions

View file

@ -15,8 +15,7 @@
], ],
"conduit.uri" : null, "conduit.uri" : null,
"conduit.user" : null, "conduit.token" : null,
"conduit.cert" : null,
"macro.size" : 48, "macro.size" : 48,
"macro.aspect" : 0.66, "macro.aspect" : 0.66,

View file

@ -32,7 +32,7 @@ These are the configuration values it reads:
- `join` Array, list of channels to join. - `join` Array, list of channels to join.
- `handlers` Array, list of handlers to run. These are like plugins for the - `handlers` Array, list of handlers to run. These are like plugins for the
bot. bot.
- `conduit.uri`, `conduit.user`, `conduit.cert` Conduit configuration, - `conduit.uri`, `conduit.token` Conduit configuration,
see below. see below.
- `notification.channels` Notification configuration, see below. - `notification.channels` Notification configuration, see below.
@ -72,10 +72,8 @@ with. To do this, login to Phabricator as an administrator and go to
- `conduit.uri` The URI for your Phabricator install, like - `conduit.uri` The URI for your Phabricator install, like
`http://phabricator.example.com/` `http://phabricator.example.com/`
- `conduit.user` The username your bot should login to Phabricator with -- - `conduit.token` The user's conduit API token, from the "Conduit API Tokens"
whatever you selected above, like `phabot`. tab in the user's administrative view.
- `conduit.cert` The user's certificate, from the "Conduit Certificate" tab
in the user's administrative view.
Now the bot should be able to connect to Phabricator via Conduit. Now the bot should be able to connect to Phabricator via Conduit.

View file

@ -159,11 +159,10 @@ final class PhabricatorBot extends PhabricatorDaemon {
if (empty($this->conduit)) { if (empty($this->conduit)) {
throw new Exception( throw new Exception(
pht( pht(
"This bot is not configured with a Conduit uplink. Set '%s', ". "This bot is not configured with a Conduit uplink. Set '%s' and ".
"'%s' and '%s' in the configuration to connect.", "'%s' in the configuration to connect.",
'conduit.uri', 'conduit.uri',
'conduit.user', 'conduit.token'));
'conduit.cert'));
} }
return $this->conduit; return $this->conduit;
} }