mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 11:30:55 +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:
parent
2c9a93eda7
commit
8cdf1a890a
3 changed files with 7 additions and 11 deletions
|
@ -15,8 +15,7 @@
|
|||
],
|
||||
|
||||
"conduit.uri" : null,
|
||||
"conduit.user" : null,
|
||||
"conduit.cert" : null,
|
||||
"conduit.token" : null,
|
||||
|
||||
"macro.size" : 48,
|
||||
"macro.aspect" : 0.66,
|
||||
|
|
|
@ -32,7 +32,7 @@ These are the configuration values it reads:
|
|||
- `join` Array, list of channels to join.
|
||||
- `handlers` Array, list of handlers to run. These are like plugins for the
|
||||
bot.
|
||||
- `conduit.uri`, `conduit.user`, `conduit.cert` Conduit configuration,
|
||||
- `conduit.uri`, `conduit.token` Conduit 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
|
||||
`http://phabricator.example.com/`
|
||||
- `conduit.user` The username your bot should login to Phabricator with --
|
||||
whatever you selected above, like `phabot`.
|
||||
- `conduit.cert` The user's certificate, from the "Conduit Certificate" tab
|
||||
in the user's administrative view.
|
||||
- `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.
|
||||
|
||||
|
|
|
@ -159,11 +159,10 @@ final class PhabricatorBot extends PhabricatorDaemon {
|
|||
if (empty($this->conduit)) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
"This bot is not configured with a Conduit uplink. Set '%s', ".
|
||||
"'%s' and '%s' in the configuration to connect.",
|
||||
"This bot is not configured with a Conduit uplink. Set '%s' and ".
|
||||
"'%s' in the configuration to connect.",
|
||||
'conduit.uri',
|
||||
'conduit.user',
|
||||
'conduit.cert'));
|
||||
'conduit.token'));
|
||||
}
|
||||
return $this->conduit;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue