Skip to main content

Module recipe

Module recipe 

Source
Expand description

The recipe format: a named, ordered list of transformation steps.

JSON uses externally tagged steps, so a recipe reads as data:

{
  "name": "clean",
  "steps": [
    { "dropEventTypes": ["subscribed", "mentioned"] },
    { "dropEventsWhere": { "eventType": "comment", "attr": "body",
                           "matches": "(?i)^(thanks|thank you|lgtm)[!. ]*$" } },
    { "renameEventTypes": { "labeled": "triage", "unlabeled": "triage" } },
    { "timeWindow": { "from": "2024-01-01", "to": "2025-01-01" } },
    { "keepObjectTypes": ["issue", "user"] },
    "dropObjectsWithoutEvents"
  ]
}

Structs§

AliasTable
The alias table of Step::MapObjectIds.
EventPredicate
Conditions on one event; all set fields must hold (AND). At least one condition is required, and value conditions require attr. An event without the named attribute never matches.
Recipe
A named transformation pipeline.
TimeWindow
Half-open time window [from, to). Bounds accept RFC 3339 or YYYY-MM-DD; a date-only to means “up to and including that day” (it parses to the following midnight).

Enums§

Step
One transformation step. Applied in recipe order; each step’s effect is reported (events/objects before and after).