Skip to content

Commit

Permalink
Merge pull request #471 from linear-b/draft-triggering
Browse files Browse the repository at this point in the history
change text for draft prs
  • Loading branch information
PavelLinearB committed Mar 12, 2024
2 parents 00ca110 + e4c58be commit d5ee818
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
22 changes: 11 additions & 11 deletions docs/execution-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion docs/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d5ee818

Please sign in to comment.