Skip to content

Commit

Permalink
Update config docs and README
Browse files Browse the repository at this point in the history
  • Loading branch information
etcinit committed Nov 28, 2015
1 parent 693f8d7 commit f8deee4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 98 deletions.
106 changes: 11 additions & 95 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,97 +15,22 @@ available at the **legacy** branch, but it won't be actively maintained.
organization is big enough).
- Pretty icons ;)

## Guides

- [Getting Started](http://phabricator.chromabits.com/w/phabulous/start/):
A guide on how to setup Phabulous for the first time.
- [Upgrade Notes](http://phabricator.chromabits.com/w/phabulous/upgrade/):
Instructions on how to upgrade to newer versions of Phabulous.
- [Help & Troubleshooting](http://phabricator.chromabits.com/w/phabulous/faq/):
Tips and answers to common problems.
- [Wiki](http://phabricator.chromabits.com/w/phabulous/): More articles and
information about Phabulous.

## Requirements

- Phabricator admin access and a certificate
- Slack API token

## Getting started

1. Create a directory for the bot: `mkdir phabulous`.
2. Download the latest stable release for your OS from the [releases page](https://github.com/etcinit/phabulous/releases) and
save it there.
3. Create a configuration file `config/main.yml` using the one on this
repository as a template.
4. Get a Slack Web API token from https://api.slack.com/web. Write it down on
the config file (`slack.token` key).
5. Go to your Phabricator's settings panel and get your Conduit certificate: https://such.phabricator.wow/settings/panel/apitokens/, and place it on the
configuration file as well (`conduit.cert`). You will also need to specify the
URL for your Phabricator instance (`conduit.api`).
6. Start the server: `./phabulous server`.
7. If everything is working fine, add an entry to your Phabricator's config to
call Phabulous' event webhook. The URL should be the address and port of the
server you are running the bot in. Example for bot running in the same server
as Phabricator:

```json
//...
"feed.http-hooks": [
"http://localhost:8086/v1/feed/receive"
]
//...
```

## Help & Troubleshooting

### Events are not showing up

Make sure that the `feed.http-hooks` setting on your Phabricator instance is
setup correctly, and that the server can communicate with the Phabulous API.
An easy way to test this is using `curl` from the server hosting Phabricator:

```sh
curl http://localhost:8086
```

The command above should return something like:

```json
{
"messages": ["Welcome to the Phabulous API"],
"status": "success",
"version": "1.0.0"
}
```

### Self-signed certificates

If you are using self-signed certificates for your Phabricator instance, you
can disable checking at your own risk by setting `misc.ignore-ca` to `true` on
your configuration file.

### OMG, the feed is flooding everything

The `channels.feed` setting tells Phabulous where to post about every single
feed event from Phabricator. This might get too noisy if you have a constant
stream of events. To disable the feed channel, just set it to an empty string:

```yaml
channels:
feed: ''
```
### Routing events
Phabulous supports routing events concerning Revisions, Tasks and Commits to
specific channels, such as Project's or Repo's channel:
```yaml
channels:
feed: '#phabricator'
repositories:
CALLSIGN: '#channel'
OTHERCALLSIGN: '#otherchannel'
projects:
10: '#anotherchannel'
```
Specifying repository-channel mappings will cause Revision and Commit events
for that repository to be sent to the provided channel. The same applies for
project-channels mappings and Task events.
Project IDs can be found in the URL of a project.
## Compiling from source

```
Expand All @@ -118,12 +43,3 @@ git clone [email protected]:etcinit/phabulous.git
cd phabulous
make
```

## Roadmap

- Improve error handling in general.
- Add support for various commands, such as looking up objects or creating
memes using macros.
- Add support for etcd or some database configuration backend, so the server
does not need to be restarted in order to update its configuration.
- Windows support?
21 changes: 18 additions & 3 deletions config/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
server:
port: 8085
debug: false

# Serious-mode makes some messages more formal and business-friendly.
serious: false
slack:
token: YOUR_TOKEN_HERE
username: phabulous
conduit:
user: etcinit
api: ''
cert: ''
api: https://phabricator.replace.me

# For token-based auth, use the following key:
token: YOUR_TOKEN_HERE

# For certificate-based auth, use the following keys:
#user: etcinit
#cert: ''
channels:
# The feed channel is where Phabulous will post every feed event to this
# channel. Leave it blank to disable this feature.
feed: '#phabricator'

# You can map repositories to a channel. This will send feed events regarding
# commits and revisions to the specified channel.
repositories:
CALLSIGN: '#channel'
OTHERCALLSIGN: '#otherchannel'

# You can map projects to a channel. This will send feed events regarding
# tasks to the specified channel.
projects:
10: '#anotherchannel'
misc:
Expand Down

0 comments on commit f8deee4

Please sign in to comment.