diff --git a/docs/execution-model.md b/docs/execution-model.md index edd52e9b..43e5f0a4 100644 --- a/docs/execution-model.md +++ b/docs/execution-model.md @@ -25,17 +25,17 @@ Use explicit triggers to enhance the control and customization of automations in Add the `on` keyword to the file and/or to a specific automation to define explicit triggers. gitStream supports the following explicit triggers: -| Triggering event | Explicit Trigger :fontawesome-brands-github: | Default (implicit triggers) | -| ---- | ---- | ---- | -| Creating a PR | `pr_created` | `on` | -| Commit | `commit` | `on` | -| Adding label | `label_added` | when `pr.label` in `.cm` | -| Removing label | `label_removed` | when `pr.label` in `.cm` | -| Merging the PR | `merge` | `off` | -| Adding new comment | `comment_added` | when `pr.comment` in `.cm` | -| Editing an existing comment | - | when `pr.comment` in `.cm` | -| Title change | - | when `pr.title` in `.cm` | -| Description change | - | when `pr.description` in `.cm` | +| Triggering event | Explicit Trigger :fontawesome-brands-github: | Default (implicit triggers) | +| ------------------------------------------------------- | -------------------------------------------- | ------------------------------ | +| Creating a PR | `pr_created` | `on` | +| Commit | `commit` | `on` | +| Adding label | `label_added` | when `pr.label` in `.cm` | +| Removing label | `label_removed` | when `pr.label` in `.cm` | +| Merging the PR | `merge` | `off` | +| Adding new comment | `comment_added` | when `pr.comment` in `.cm` | +| :fontawesome-brands-github: Editing an existing comment | - | when `pr.comment` in `.cm` | +| Title change | - | when `pr.title` in `.cm` | +| Description change | - | when `pr.description` in `.cm` | Explicit triggers are set independently per each automation block and can be configured at the file level, specific to each automation separately or in a combination of the two. If triggers are listed at the file level **and** specific automation, the automation will be triggered according to both triggers. diff --git a/docs/how-it-works.md b/docs/how-it-works.md index 4f76ec2f..c4007662 100644 --- a/docs/how-it-works.md +++ b/docs/how-it-works.md @@ -31,7 +31,9 @@ Here is an example of the basic components that are required in every CM file. !!! info When editing CM files, make sure you preserve the indentation in the examples because, like YAML, gitStream uses Python-style indentation to indicate nesting. ### Automation Actions -[Automation actions](/automation-actions) specify the desired automations that should be triggered when all conditions are met. Each automation must include an `if` condition and a `run` section. The conditions are evaluated whenever someone creates a PR or makes changes to an existing PR; multiple conditions can be listed for a single automation, but they must all be true to invoke the actions. You can have any number of actions listed in one automation. Actions are invoked one-by-one in no particular order. PRs that are marked as Draft are ignored by default, but you can control that using [explicit triggers](./execution-model.md#explicit-triggers). +[Automation actions](/automation-actions) define the desired automations triggered when specific conditions are met. Each automation must contain an `if` condition and a `run` section. Conditions are evaluated when a PR is created or modified. Multiple conditions can be listed, but all must be true to trigger the actions. + +Any number of actions can be included in a single automation, and these actions are invoked one-by-one in no particular order. PRs marked as Draft are ignored by default, and this behavior can be modified using [explicit triggers](./execution-model.md#explicit-triggers) (GitHub only). !!! example "Basic Automation Example" This example defines an automation named `welcome_newcomer` that post a comment to welcome anyone who submits their first PR to the repo.