Skip to content

Commit

Permalink
Merge pull request #472 from linear-b/new_triggers
Browse files Browse the repository at this point in the history
New triggers - pr_ready_for_review, pr_closed, pr_reopened
  • Loading branch information
PavelLinearB committed Mar 14, 2024
2 parents d5ee818 + c7b8653 commit 5988c15
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
7 changes: 7 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# /:\\ gitStream Changelog
All notable changes to this project will be documented in this file.


### 2024.3.14
- Added the following explicit triggers:
- `pr_ready_for_review`
- `pr_closed`
- `pr_reopened`

### 2024.3.7
- Triggering on comment edits
- Added support for `request-changes` action in GitLab
Expand Down
26 changes: 14 additions & 12 deletions docs/execution-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ 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` |
| :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` |

| 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` |
| :fontawesome-brands-github: 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` |
| :fontawesome-brands-github: Transition from draft to ready for review | `pr_ready_for_review` | `off` |
| :fontawesome-brands-github: transition from any state to closed | `pr_closed` | `off` |
| :fontawesome-brands-github: transition from closed to open | `pr_reopened` | `off` |

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.
If an automation block does not have explicit triggers configured, it will be triggered according to the default (implicit) triggers.
Expand Down

0 comments on commit 5988c15

Please sign in to comment.