Skip to content

Separate the Event class in separate files

Context

The Event class is building several kinds of events based on the object_kind field in the webhook payload (e.g. IncidentEvent, IssueEvent, ...). This file contains all the implementations of the events.

As a result, the triage/triage/event.rb file is close to 1000 lines, and it's spec file is above 2500 lines.

Goal

  • Separate the different Events in separate files.
  • Extract specs for those Events in separate files as well.