bender-bot 0.4.3 → 0.4.4
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/main.rb +7 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb5513228c548c513ce2e5d9ac1334533fe1585e
|
4
|
+
data.tar.gz: b04c3ce4225699684f13608dcb45b1ee8787c066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c5c2be4556cbf32baaf45fe51b9558a0865b1a29e6623f5b3fe2a697aaa93f13e6c6158d18211b257dc3d54fecc35f120cabd43c5d6b3fa1a3af3345ef774b5
|
7
|
+
data.tar.gz: b0df342ecf533c2059392f88993e1733669521d57c0aded6b520c9bb88a6a447b3d16de10e5ecd4cb39d827d40d9585a42aa0dfc325f99cc9793b15dc91ed08e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.4
|
data/lib/bender/main.rb
CHANGED
@@ -184,7 +184,7 @@ module Bender
|
|
184
184
|
@room_name ||= bot.store['primary_room_name'] || new_room['name']
|
185
185
|
@room_topic ||= bot.store['primary_room_topic'] || new_room['topic']
|
186
186
|
|
187
|
-
@open =
|
187
|
+
@open = 1 unless defined? @open
|
188
188
|
|
189
189
|
log.info \
|
190
190
|
primary_room_name: bot.store['primary_room_name'],
|
@@ -197,8 +197,8 @@ module Bender
|
|
197
197
|
|
198
198
|
if open_incidents.empty?
|
199
199
|
if @open
|
200
|
-
new_room['name'] =
|
201
|
-
new_room['topic'] =
|
200
|
+
new_room['name'] = '[NONE] Production Incident'
|
201
|
+
new_room['topic'] = 'Good news everyone! No open incidents at the moment'
|
202
202
|
begin
|
203
203
|
room.update_room(new_room)
|
204
204
|
rescue NoMethodError
|
@@ -215,8 +215,9 @@ module Bender
|
|
215
215
|
end
|
216
216
|
|
217
217
|
unless @open == open_incidents.size
|
218
|
-
new_room['name'] = '
|
219
|
-
|
218
|
+
new_room['name'] = '[IN PROGRESS] Production Incident'
|
219
|
+
tha_news = open_incidents.size == 1 ? "There's an open incident" : "There are #{open_incidents.size} open incidents"
|
220
|
+
new_room['topic'] = "Terrible news everyone! #{tha_news}"
|
220
221
|
begin
|
221
222
|
room.update_room(new_room)
|
222
223
|
rescue NoMethodError
|
@@ -255,7 +256,7 @@ module Bender
|
|
255
256
|
sleep options.issue_refresh
|
256
257
|
rescue HipChat::UnknownResponseCode
|
257
258
|
log.warn 'HipChat::UnknownResponseCode in set_room_name_and_topic'
|
258
|
-
sleep
|
259
|
+
sleep 2
|
259
260
|
end
|
260
261
|
end
|
261
262
|
end
|