lib/dri/commands/incidents.rb in dri-0.3.1 vs lib/dri/commands/incidents.rb in dri-0.4.0
- old
+ new
@@ -29,16 +29,16 @@
spinner.run do
response = api_client.incidents
if response.nil?
logger.info 'Hooray, no active incidents 🎉.'
- exit 0
+ break
end
response.each do |incident|
- title = incident['title'].truncate(70)
- url = incident['web_url']
- labels = incident['labels']
+ title = incident.title.truncate(70)
+ url = incident.web_url
+ labels = incident.labels
status = "N/A"
service = "N/A"
labels.each do |label|
status = label.gsub!('Incident::', ' ').to_s if label.include? "Incident::"