Skip to content

Commit 8cdf1a8

Browse files
author
Josh Cox
committed
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
1 parent 2c9a93e commit 8cdf1a8

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

resources/chatbot/example_config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
],
1616

1717
"conduit.uri" : null,
18-
"conduit.user" : null,
19-
"conduit.cert" : null,
18+
"conduit.token" : null,
2019

2120
"macro.size" : 48,
2221
"macro.aspect" : 0.66,

src/docs/tech/chatbot.diviner

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ These are the configuration values it reads:
3232
- `join` Array, list of channels to join.
3333
- `handlers` Array, list of handlers to run. These are like plugins for the
3434
bot.
35-
- `conduit.uri`, `conduit.user`, `conduit.cert` Conduit configuration,
35+
- `conduit.uri`, `conduit.token` Conduit configuration,
3636
see below.
3737
- `notification.channels` Notification configuration, see below.
3838

@@ -72,10 +72,8 @@ with. To do this, login to Phabricator as an administrator and go to
7272

7373
- `conduit.uri` The URI for your Phabricator install, like
7474
`http://phabricator.example.com/`
75-
- `conduit.user` The username your bot should login to Phabricator with --
76-
whatever you selected above, like `phabot`.
77-
- `conduit.cert` The user's certificate, from the "Conduit Certificate" tab
78-
in the user's administrative view.
75+
- `conduit.token` The user's conduit API token, from the "Conduit API Tokens"
76+
tab in the user's administrative view.
7977

8078
Now the bot should be able to connect to Phabricator via Conduit.
8179

src/infrastructure/daemon/bot/PhabricatorBot.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,10 @@ public function getConduit() {
159159
if (empty($this->conduit)) {
160160
throw new Exception(
161161
pht(
162-
"This bot is not configured with a Conduit uplink. Set '%s', ".
163-
"'%s' and '%s' in the configuration to connect.",
162+
"This bot is not configured with a Conduit uplink. Set '%s' and ".
163+
"'%s' in the configuration to connect.",
164164
'conduit.uri',
165-
'conduit.user',
166-
'conduit.cert'));
165+
'conduit.token'));
167166
}
168167
return $this->conduit;
169168
}

0 commit comments

Comments
 (0)