Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 325bdc7

Browse files
Merge pull request #1213 from github/janky-help-messages
[janky] slightly more helpful error messages
2 parents 40ea758 + 0adb3ea commit 325bdc7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/scripts/janky.coffee

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ module.exports = (robot) ->
8989
if statusCode == 200
9090
msg.send body
9191
else
92-
msg.reply "can't help you right now."
92+
msg.reply "Unable to fetch help. Got HTTP status #{statusCode}"
9393

9494
robot.respond /ci build ([-_\.0-9a-zA-Z]+)(\/([-_\+\.a-zA-z0-9\/]+))?/i, (msg) ->
9595
app = msg.match[1]
@@ -102,7 +102,7 @@ module.exports = (robot) ->
102102
response = body
103103
else
104104
console.log body
105-
response = "Can't go HAM on #{app}/#{branch}, shit's being weird."
105+
response = "Can't go HAM on #{app}/#{branch}, shit's being weird. Got HTTP status #{statusCode}"
106106

107107
msg.send response
108108

@@ -118,7 +118,7 @@ module.exports = (robot) ->
118118
if statusCode == 201
119119
msg.reply body
120120
else
121-
msg.reply "Error F7U12: Can't Setup."
121+
msg.reply "Can't Setup. Make sure I have access to it. Expected HTTP status 201, got #{statusCode}"
122122

123123
robot.respond /ci toggle ([-_\.0-9a-zA-Z]+)/i, (msg) ->
124124
app = msg.match[1]
@@ -127,7 +127,7 @@ module.exports = (robot) ->
127127
if statusCode == 200
128128
msg.send body
129129
else
130-
msg.reply "failed to flip the flag. Sorry."
130+
msg.reply "Failed to flip the flag. Sorry. Got HTTP status #{statusCode}"
131131

132132
robot.respond /ci set room ([-_0-9a-zA-Z\.]+) (.*)$/i, (msg) ->
133133
repo = msg.match[1]
@@ -136,7 +136,7 @@ module.exports = (robot) ->
136136
if [404, 403, 200].indexOf(statusCode) > -1
137137
msg.send body
138138
else
139-
msg.send "you broke everything"
139+
msg.send "I couldn't update the room. Got HTTP status #{statusCode}"
140140

141141
robot.respond /ci rooms$/i, (msg) ->
142142
get "rooms", { }, (err, statusCode, body) ->
@@ -160,7 +160,7 @@ module.exports = (robot) ->
160160
if statusCode == 200
161161
msg.send(body)
162162
else
163-
msg.send("who knows")
163+
msg.send("Couldn't get status. Got HTTP status #{statusCode}")
164164

165165
robot.respond /ci status (-v )?([-_\.0-9a-zA-Z]+)(\/([-_\+\.a-zA-z0-9\/]+))?/i, (msg) ->
166166
app = msg.match[2]

0 commit comments

Comments
 (0)