bender-bot 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/bender/bot.rb +5 -0
- data/lib/bender/main.rb +11 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2a239c9e921582eedb98cb69a6e22fea2f003ec
|
4
|
+
data.tar.gz: 23679335beaea816a8c40971e5bf3c29a5f160b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54e972a7b4a613ed6933efd82bc22227f5947928cb52421c219848fb609ae97432e82023ff3dbbd7e1c8095c32a7ffd3a926514bd50164e7c430729860163954
|
7
|
+
data.tar.gz: 6a8f45903c3f55ffba0ef4346a29d5238c5add1a95344b77c7bba8b340ad859088b1133eb85725a06741a4bb9a2a224c5b6d8e0452f67db23c9ea8143738d88c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
data/lib/bender/bot.rb
CHANGED
@@ -374,6 +374,11 @@ private
|
|
374
374
|
if issue.has_key? 'key'
|
375
375
|
[ 'Filed ' + incident_link(issue), :green ]
|
376
376
|
else
|
377
|
+
log.error \
|
378
|
+
error: 'Could not file ticket',
|
379
|
+
reason: 'Invalid response',
|
380
|
+
request: req.inspect,
|
381
|
+
response: issue
|
377
382
|
[ "Sorry, I couldn't file that!", :red ]
|
378
383
|
end
|
379
384
|
end
|
data/lib/bender/main.rb
CHANGED
@@ -184,6 +184,14 @@ module Bender
|
|
184
184
|
room = hipchat[room_id]
|
185
185
|
new_room = room.get_room
|
186
186
|
|
187
|
+
if incidents.nil?
|
188
|
+
log.error \
|
189
|
+
error: 'Cannot set room name and topic',
|
190
|
+
reason: 'incidents are nil',
|
191
|
+
room_id: room_id
|
192
|
+
return
|
193
|
+
end
|
194
|
+
|
187
195
|
open_incidents = incidents.select do |i|
|
188
196
|
status = normalize_value i['fields']['status']
|
189
197
|
severity = short_severity(i['fields'][SEVERITY_FIELD]['value'])
|
@@ -311,8 +319,9 @@ module Bender
|
|
311
319
|
end
|
312
320
|
|
313
321
|
users = data.inject({}) do |h, user|
|
314
|
-
h[user['
|
315
|
-
|
322
|
+
h[user['name']] = {
|
323
|
+
key: user['key'],
|
324
|
+
nick: user['name'],
|
316
325
|
name: user['displayName'],
|
317
326
|
email: user['emailAddress']
|
318
327
|
} ; h
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bender-bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Clemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|