Class: Commands::Notes
- Inherits:
-
Object
- Object
- Commands::Notes
- Includes:
- Base
- Defined in:
- lib/lita/commands/notes.rb
Instance Method Summary collapse
Methods included from Base
#current_user, #format_incident, #format_incidents, #format_note, #format_notes, included, #initialize, #pagerduty, #response, #store
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/lita/commands/notes.rb', line 5 def call incident_id = .match_data['incident_id'] notes = pagerduty.get_notes_by_incident_id(incident_id) response format_notes(notes, incident_id) rescue Exceptions::IncidentNotFound response message: 'incident.not_found', params: { id: incident_id } rescue Exceptions::NotesEmptyList response "#{incident_id}: No notes" end |