class Commands::IncidentsMine
Public Instance Methods
call()
click to toggle source
# File lib/lita/commands/incidents_mine.rb, line 5 def call incidents = pagerduty.get_incidents(query_params) response format_incidents(incidents) rescue Exceptions::IncidentsEmptyList response message: 'incident.none' rescue Exceptions::UserNotIdentified response message: 'incident.none_mine' end
Private Instance Methods
query_params()
click to toggle source
# File lib/lita/commands/incidents_mine.rb, line 16 def query_params { statuses: %w[triggered acknowledged], 'user_ids[]' => current_user[:id] } end