nzoschke/off-call — pull request #2 by mmcgrana (2012-05-27 19:49:58+00:00)
Title: tweaked approach to incident subjects

It looks like different types of incidents have slightly different schemas with respect to incident keys & subject titles. Some have good `incident_key` (e.g. API-triggered incidents), others have an `incident_key` but it doesn't seem to be useful (e.g. email-triggered incident `incident_key`s just say "triggered by email"), and others don't have them at all (e.g. manually opened incidents). This patch attempts to choose the right name for incidents given these differing schemas.

I didn't dig into the API to much, so there may well be better ways to approach this.

Also, adds truncation of incident titles to prevent huge tables, especially from incidents that have SQL queries in them.