This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f48fac
commit cfc4448
Showing
6 changed files
with
55 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
FROM node:latest | ||
|
||
RUN mkdir /bot | ||
RUN mkdir /bot && cd /bot | ||
|
||
ADD . /bot | ||
|
||
EXPOSE 9999 | ||
|
||
CMD cd /bot; bin/hubot --adapter slack | ||
WORKDIR /bot | ||
|
||
CMD ["bin/hubot", "--adapter", "slack"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
[ | ||
"google.coffee", | ||
"redmine.coffee" | ||
"google.coffee" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Description: | ||
# Redmineにチケットを登録する | ||
# | ||
# Configuration: | ||
# HUBOT_REDMINE_BASE_URL | ||
# HUBOT_REDMINE_TOKEN | ||
# | ||
# Commands: | ||
# hubot redmine create <subject> - RedmineのBuddyプロジェクトにチケットを登録します | ||
# | ||
# Author: | ||
# satoshun00 | ||
|
||
request = require 'request' | ||
|
||
module.exports = (robot) -> | ||
robot.respond /redmine create (.+)$/i, (msg) -> | ||
data = | ||
issue: | ||
project_id: 'Buddy' | ||
subject: msg.match[1] | ||
url = process.env.HUBOT_REDMINE_BASE_URL.replace /\/$/, '' | ||
request | ||
url: url + '/issues.json' | ||
method: 'POST' | ||
headers: | ||
Accept: 'application/json' | ||
"X-Redmine-API-Key": process.env.HUBOT_REDMINE_TOKEN | ||
json: true | ||
body: data | ||
, (err, res, body) -> | ||
msg.send '@satoshun00 Redmineのチケット作成に失敗したよ =͟͟͞͞((☞ ՞ਊ ՞)☞' + err if err? | ||
if body? | ||
msg.send '◜◡‾)◞つくたよ http://redmine.fenneclab.com/issues/' + body.issue.id |