Parsers interpret incoming events into one the refined event types.

interface Parser {
    getEventType(eventTypeInput: EventTypeInput): Promise<string>;
    getPayload(payloadInput: EventTypeInput): Promise<EventDto>;
    getRepoName(body?: Record<string, any>): string;
}

Implemented by

Methods

  • Parameters

    Returns Promise<string>

    Normalize the incoming type of event into the three supported categories: change, deployment, or incident.

  • Parameters

    • Optionalbody: Record<string, any>

    Returns string

    Get the repository name.