https://github.com/tokenrove/chudbot
Trivial IRC bot that parrots webhooks
https://github.com/tokenrove/chudbot
Last synced: over 1 year ago
JSON representation
Trivial IRC bot that parrots webhooks
- Host: GitHub
- URL: https://github.com/tokenrove/chudbot
- Owner: tokenrove
- Created: 2015-07-05T22:02:07.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-07-13T01:25:34.000Z (almost 9 years ago)
- Last Synced: 2025-02-09T08:16:46.764Z (over 1 year ago)
- Language: Erlang
- Size: 20.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
They're not staying down there, anymore!
This is a quick-and-dirty IRC bot that listens to HTTP-based
notifications from services like Trello and Github, so you can talk
smack to your Slack-using friends.
Actually, I don't expect it to be used by other people (it certainly
isn't in any state to be reused), but it (almost) never hurts to make
your experiments, toys, and tests public.
Adding Github hooks
-------------------
[See the documentation on Github](https://developer.github.com/webhooks/creating/).
Adding Trello hooks
-------------------
Get your application key from [https://trello.com/1/appKey/generate](https://trello.com/1/appKey/generate).
Visit
```
https://trello.com/1/authorize?name=Chudbot&expiration=never&response_type=token&key=[YOUR KEY HERE]
```
in a browser to get a suitable token and setup `priv/trello.config`.
You can then use the functions in `chudbot_trello` to setup your
webhooks. This is not particularly usable:
```erlang
> {ok, TrelloConfig} =
file:consult(filename:join([code:priv_dir(chudbot), "trello.config"])).
> chudbot_trello:start().
> BoardsToModelIds = chudbot_trello:list_boards(TrelloConfig).
> BaseUrl = "http://wherever.example.com:8080".
> ModelId = proplists:get_value(<<"My board">>, BoardsToModelIds).
> chudbot_trello:subscribe_webhook(ModelId, TrelloConfig, BaseUrl).
```
Adding BuildBot hooks
---------------------
Use [HttpStatusPush](http://docs.buildbot.net/0.8.1/HttpStatusPush.html):
```python
import buildbot.status.status_push
sp = buildbot.status.status_push.HttpStatusPush(serverUrl="http://example.com/chudbot/buildbot")
c['status'].append(sp)
```
Beware that buildbot will relentlessly hammer chudbot if it thinks the
status push failed.