abstract class BaseEvent

Overview

BaseEvent is an abstract base class for all event types. It provides a common interface for handling and checking for events.

Direct Known Subclasses

Defined in:

runway/models/base_event.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(log : Log, event : Event) #

Initializes a new BaseEvent.

@param log [Log] The logger to use. @param event [Event] The event configuration.


[View source]

Instance Method Detail

abstract def check_for_event : Payload #

Checks for the event. Subclasses must implement this method. In general, checking for an event means polling a source (e.g. GitHub) for new events. This could also mean checking for a new release, an updated commit, etc. All event types must have a Payload object as their return type Example: return Payload.new(ship_it: true) where ship_it is a boolean and indicates if a deployment should be triggered from the event or not Note: The ship_it field is important throughout the codebase and should be set to true if a deployment should be triggered, and false otherwise After setting this value, it can be accessed with payload.ship_it? where it will return a boolean


[View source]
def post_deploy(payload : Payload) : Payload #

[View source]