You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify explicit vs implicit triggers and improve documentation (#808)
This adds a new warning box explaining when implicit triggers are
disabled, clarifies that `include`/`exclude` filters don't change
triggering events, and improves several explanations throughout the
execution model documentation to reduce confusion about trigger
behavior.
Copy file name to clipboardExpand all lines: docs/execution-model.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
# Trigger Control
2
2
3
3
!!! warning "Platform Limitations"
4
-
**Explicit triggers** (using `on`, `triggers.on`, `triggers.include`, and `triggers.exclude` parameters) are only supported on GitHub :fontawesome-brands-github:. Using explicit triggers in GitLab or Bitbucket will cause the automation to fail with an error. For GitLab and Bitbucket, simply omit trigger configuration to use implicit triggers automatically.
4
+
**Explicit triggers** (using `on`, `triggers.on`, `triggers.include`, and `triggers.exclude` parameters) are only supported on GitHub :fontawesome-brands-github:.
5
+
6
+
Using explicit triggers in GitLab or Bitbucket will cause the automation to fail with an error. For GitLab and Bitbucket, simply omit trigger configuration to use implicit triggers automatically.
5
7
6
8
However, other execution control concepts covered in this document, such as action-level execution control, apply to all supported platforms (GitHub, GitLab, and Bitbucket).
7
9
@@ -41,14 +43,19 @@ gitstream supports an explicit triggering mechanism. When using explicit trigger
41
43
42
44
Triggers can be defined globally at the file level or specifically for each automation. Triggers are applied only to the file(s) where they are declared.
43
45
46
+
!!! important "When Implicit Triggers Are Disabled"
47
+
Implicit triggers are disabled ONLY when using `triggers.on` (file-level) or `on` (automation-level) - these parameters define explicit triggering events and completely override the default implicit trigger behavior.
48
+
49
+
When using ONLY `triggers.include` or `triggers.exclude` implicit triggers remain active - these parameters filter which branches/repositories run automations but do not change the triggering events themselves.
50
+
44
51
!!! Note "Combining File-Level and Automation-Level Triggers"
45
52
When both file-level explicit triggers and automation-level explicit triggers exist, the actual triggers used will be the result of unifying both lists. This means the automation will be triggered by any event specified in either the file-level triggers or the automation-level triggers.
46
53
47
54
#### `triggers` section
48
55
49
-
The `triggers` section in gitStream gives you precise control over when automations execute. It allows you to define conditions based on pull request events using `include` and `exclude` lists to specify branch and repository patterns. These lists determine which branches or repositories trigger or bypass automation but do not affect the events initiating automations.
56
+
The `triggers` section in gitStream gives you precise control over when automations execute. It allows you to define conditions based on pull request events using `include` and `exclude` lists to specify branch and repository patterns. These lists determine which branches or repositories trigger or bypass automation but do not affect the events initiating automations - implicit triggers remain active when using only `include` and `exclude`.
50
57
51
-
Additionally, the `on` keyword defines specific events that trigger automations. It can be added at the file level (under the `triggers` section) or within individual automations for greater customization. Multiple triggers can be stacked, meaning gitStream will execute the automation for each matching triggering event, allowing flexibility in defining automation behavior
58
+
Additionally, the `on` keyword defines specific events that trigger automations. It can be added at the file level (under the `triggers` section) or within individual automations for greater customization. When `on` is used, it switches from implicit to explicit triggering mode, meaning only the specified events will trigger automations. Multiple triggers can be stacked, meaning gitStream will execute the automation for each matching triggering event, allowing flexibility in defining automation behavior
52
59
53
60
<divclass="trigger-details"markdown=1>
54
61
| Key | Type | Description |
@@ -81,8 +88,8 @@ The table below lists supported explicit triggers, categorized into those enable
81
88
| Transition from any state to approved :fontawesome-brands-github: |`pr_approved`|`on`| when actions `require-reviewers`, `set-required-approvals`, or `merge` are used, or when `pr` context is used in `.cm`|
82
89
</div>
83
90
84
-
Explicit triggers are set independently per each automation block and can be configured at the file level, specific to each automation separately or in combination. If triggers are listed at the file level **and** specific automation, the automation will be triggered according to both triggers.
85
-
If an automation block does not have explicit triggers configured, it will be triggered according to the default (implicit) triggers.
91
+
Explicit triggers (using `on`) are set independently per each automation block and can be configured at the file level, specific to each automation separately or in combination. If triggers are listed at the file level and specific automation, the automation will be triggered according to both triggers.
92
+
If an automation block does not have the `on` parameter configured (explicit triggers), it will be triggered according to the default (implicit) triggers, even if `triggers.include` or `triggers.exclude` are used at the file level.
86
93
87
94
!!! Note
88
95
The `on` parameter can be used within individual automation blocks, while `triggers.include` and `triggers.exclude` can only be defined at the file level.
@@ -208,6 +215,8 @@ manifest:
208
215
version: 1.0
209
216
210
217
# Disable triggering when the PR is created by bots
218
+
# Note: Only using triggers.exclude means implicit triggers remain active
219
+
# (automations will still trigger on commits, PR creation, etc.)
211
220
triggers:
212
221
exclude:
213
222
branch:
@@ -231,6 +240,8 @@ And the other automations file is set to automate Dependabot PRs:
231
240
manifest:
232
241
version: 1.0
233
242
243
+
# Note: triggers.include still allows implicit triggers
244
+
# However, the automations below use 'on' which switches to explicit mode
0 commit comments