Processing rules
The current state of processing rules in Prodgator, what you can do with them today, and how a rule is evaluated.
Processing rules describe how Prodgator should treat matching pipeline events: suppress a notification, escalate it, tag it, or change a field.
Current status
Processing rules are not applied to incoming events yet. Today you can:
- Create rules and turn them on or off on the Adapters & Rules page, Processing Rules tab ( and above).
- Create, update and delete full rules, with conditions and actions, through the app API ().
- Test your rules against a sample event with , which returns what would match and what the rules would do.
Until rules run on live events, they do not change runs, notifications or deliveries.
The New Rule dialog sets a rule's name, description and priority. Conditions and actions are set through the API.
How a rule is evaluated
A rule has:
- Scope: which providers, repositories and event types it applies to.
- Conditions: checks on the event's fields. All must match.
- Actions: what to do when it matches.
- Priority: lower numbers run first.
- Stop processing: when true, no later rule runs after this one matches.
For an event, the engine:
- Takes the organization's enabled rules in priority order.
- Skips rules whose scope does not cover the event.
- Checks each remaining rule's conditions.
- Runs the actions of each rule that matches, and collects side effects (suppress, escalate, tag, priority).
- Stops early after a matching rule with stop processing set.
Side effects are collected and applied after all rules run, so one rule's side effect does not change what a later rule sees.
Example
Suppress notifications for a nightly build that is expected to fail:
{
"name": "Quiet nightly build",
"priority": 100,
"enabled": true,
"scope": { "repositories": ["my-org/legacy-app"] },
"conditions": [
{ "type": "field_equals", "field": "workflowName", "value": "nightly-build" }
],
"actions": [
{ "type": "suppress_notification" }
],
"stopProcessing": false
}See Writing rules for every condition and action.