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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c6ccf91cc16760e71a6db34d3477f511c014d6b
4
- data.tar.gz: 63313c668f314ebae70d5b1ad7ac3b3cb8b2fe9e
3
+ metadata.gz: d2a239c9e921582eedb98cb69a6e22fea2f003ec
4
+ data.tar.gz: 23679335beaea816a8c40971e5bf3c29a5f160b4
5
5
  SHA512:
6
- metadata.gz: 7feddba434c6bcf352be75172ec648cfb473ff51ca17d2cab5b00aef8d45e80db5a2219ac75b11f986014efefe225c08f6175d80f2d58ecaaa78e9d593c68146
7
- data.tar.gz: 2477050045190842fe7dcca51c42ec658dc3798f8efcf8b446325e8513a45618e03b04766d93a38952a870c17f8d6cf5d91b03e2abb9eb4236ca2171eb0b6caa
6
+ metadata.gz: 54e972a7b4a613ed6933efd82bc22227f5947928cb52421c219848fb609ae97432e82023ff3dbbd7e1c8095c32a7ffd3a926514bd50164e7c430729860163954
7
+ data.tar.gz: 6a8f45903c3f55ffba0ef4346a29d5238c5add1a95344b77c7bba8b340ad859088b1133eb85725a06741a4bb9a2a224c5b6d8e0452f67db23c9ea8143738d88c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.4
1
+ 0.5.5
@@ -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
@@ -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['key']] = {
315
- nick: user['key'],
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
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: 2015-12-04 00:00:00.000000000 Z
11
+ date: 2016-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor