Skip to content

kobarei/hubot-chatwork

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hubot-chatwork

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.

Installation

  1. Add hubot-chatwork to dependencies in your hubot's package.json.
"dependencies": {
    "hubot-chatwork": "git://github.com/kobarei/hubot-chatwork.git"
}
  1. Install hubot-chatwork.
npm install
  1. 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"
  1. Move scripts Move scripts/github-polling.coffee & scripts/chatwork-task-polling.coffee into scripts folder

  2. Run hubot with chatwork adapter.

bin/hubot -a chatwork

Note

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

License

The MIT License. See LICENSE file.

About

A hubot adapter for chatwork

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 99.5%
  • Makefile 0.5%