File tree 5 files changed +17
-6
lines changed
5 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 5
5
npm install
6
6
export PATH=" node_modules/.bin:node_modules/hubot/node_modules/.bin:$PATH "
7
7
8
- exec node_modules/.bin/hubot --adapter ${HUBOT_ADAPTER} --alias ${HUBOT_ALIAS} --name ${HUBOT_NAME} " $@ "
8
+ exec node_modules/.bin/hubot --adapter ${HUBOT_ADAPTER} --alias " ${HUBOT_ALIAS} " --name ${HUBOT_NAME} " $@ "
Original file line number Diff line number Diff line change 2
2
STUDENT_ID = unknown
3
3
SLACK_TOKEN = unkown
4
4
HUB_USER = unknown
5
-
5
+ HUBOT_ADAPTER = slack
6
+ ROCKETCHAT_URL = http://127.0.0.1:3000
7
+ ROCKETCHAT_USER = hubot
8
+ ROCKETCHAT_PASSWORD = unknown
Original file line number Diff line number Diff line change @@ -12,12 +12,19 @@ services:
12
12
EXPRESS_USER : " ${STUDENT_ID}_bot"
13
13
EXPRESS_PASSWORD : " ${STUDENT_ID}_pw"
14
14
PORT : " 8080"
15
- HUBOT_ADAPTER : " slack "
15
+ HUBOT_ADAPTER : " ${HUBOT_ADAPTER} "
16
16
HUBOT_ALIAS : " ${STUDENT_ID}"
17
17
HUBOT_NAME : " ${STUDENT_ID}_bot"
18
18
HUBOT_LOG_LEVEL : " debug"
19
19
REDIS_URL : " redis://redis:6379"
20
20
HUBOT_SLACK_TOKEN : " ${SLACK_TOKEN}"
21
+ RESPOND_TO_DM : " true"
22
+ ROCKETCHAT_URL : " ${ROCKETCHAT_URL}"
23
+ ROCKETCHAT_ROOM : " "
24
+ LISTEN_ON_ALL_PUBLIC : " true"
25
+ ROCKETCHAT_USER : " ${ROCKETCHAT_USER}"
26
+ ROCKETCHAT_PASSWORD : " ${ROCKETCHAT_PASSWORD}"
27
+ ROCKETCHAT_AUTH : " password"
21
28
ports :
22
29
- " 8080:8080"
23
30
links :
Original file line number Diff line number Diff line change 7
7
"dependencies" : {
8
8
"hubot" : " ^2.19.0" ,
9
9
"hubot-diagnostics" : " ^0.0.2" ,
10
- "hubot-help" : " ^0.2.2 " ,
10
+ "hubot-help" : " ^1.0.1 " ,
11
11
"hubot-redis-brain" : " ^1.0.0" ,
12
+ "hubot-rocketchat" : " ^1.0.12" ,
12
13
"hubot-scripts" : " ^2.17.2" ,
13
14
"hubot-slack" : " ^4.4.0" ,
14
15
"moment-timezone" : " ^0.5.13" ,
Original file line number Diff line number Diff line change @@ -21,14 +21,14 @@ module.exports = (robot) ->
21
21
sidKey = parseInt (0 )
22
22
23
23
robot .respond / sid reset ([0-9 \. ] + )/ i , (msg ) ->
24
- if robot .alias isnt " 0"
24
+ if robot .alias isnt " 0" && robot . alias isnt " 0 "
25
25
msg .send " This is not the correct bot. Ensure you are in the instructor room and type '0 sid get'."
26
26
else
27
27
sidKey = parseInt (msg .match [1 ])
28
28
msg .send " Student ID base reset to #{ sidKey} "
29
29
30
30
robot .respond / sid get/ i , (msg ) ->
31
- if robot .alias isnt " 0"
31
+ if robot .alias isnt " 0" && robot . alias isnt " 0 "
32
32
msg .send " This is not the correct bot. Ensure you are in the instructor room and type '0 sid get'."
33
33
else
34
34
sidKey = sidKey + 1
You can’t perform that action at this time.
0 commit comments