lib/dri/commands/incidents.rb in dri-0.7.0 vs lib/dri/commands/incidents.rb in dri-0.8.0

- old
+ new

@@ -1,14 +1,16 @@ # frozen_string_literal: true require_relative '../command' require_relative '../utils/table' +require_relative '../utils/constants' module Dri module Commands class Incidents < Dri::Command include Dri::Utils::Table + include Dri::Utils::Constants::Triage::Labels using Refinements def initialize(options) @options = options end @@ -40,11 +42,11 @@ labels = incident.labels status = "N/A" service = "N/A" labels.each do |label| - status = label.gsub!('Incident::', ' ').to_s if label.include? "Incident::" - service = label.gsub!('Service::', ' ').to_s if label.include? "Service::" + status = label.gsub!(INCIDENT, ' ').to_s if label.include? INCIDENT + service = label.gsub!(SERVICE, ' ').to_s if label.include? SERVICE end incidents << [title, service, status, url] end end