A Hubot adapter for chatwork.
This repo is quite different from original akiomik/hubot-chatwork. Most of functions are modified, removed or devided into src/scripts
. Test files are not modified for these changes.
- Add
hubot-chatwork
to dependencies in your hubot'spackage.json
.
"dependencies": {
"hubot-chatwork": "git://github.com/kobarei/hubot-chatwork.git"
}
- Install
hubot-chatwork
.
npm install
- Set environment variables.
export HUBOT_CHATWORK_TOKEN="DEADBEEF" # see http://developer.chatwork.com/ja/authenticate.html
export HUBOT_CHATWORK_ROOMS="123,456" # comma separated
export HUBOT_CHATWORK_ID="123456" # chatwork ID for hubot task
export HUBOT_GITHUB_TOKEN="**************************"
export HUBOT_GITHUB_OWNER="kobarei"
export HUBOT_GITHUB_REPOS="hubot-chatwork,another_repo" # this is optional settings
export HUBOT_TRELLO_KEY="*********" \
export HUBOT_TRELLO_TOKEN="**********" \
export HUBOT_TRELLO_BOARDS="***********" \
export HUBOT_API_RATE="360"
-
Move scripts Move
scripts/github-polling.coffee
&scripts/chatwork-task-polling.coffee
intoscripts
folder -
Run hubot with chatwork adapter.
bin/hubot -a chatwork
GET /rooms/{room_id}/messages
API is NOT provided yet from Chatwork.
So Chatwork API will return 501
error response.
Modify node_modules/hubot/src/listener.coffee
when hubot can't POST to ChatWork.
constructor: (@robot, @regex, @callback) ->
- if message instanceof TextMessage
- message.match @regex
+ message.match? @regex
The MIT License. See LICENSE
file.