Skip to content

Commit 349ba14

Browse files
authored
Update Execution Model docs with trigger matching details (#757)
* Update Execution Model docs with trigger matching details * Update execution-model.md
1 parent 26ae5df commit 349ba14

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

docs/execution-model.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,31 @@ If an automation block does not have explicit triggers configured, it will be tr
8282
!!! Note
8383
The `on` parameter can be used within individual automation blocks, while `triggers.include` and `triggers.exclude` can only be defined at the file level.
8484

85+
**Note on Matching:**
86+
87+
- When using a `String` as the matching type, the values in `triggers.include.*` and `triggers.exclude.*` require exact matches. This means that the names of branches or repositories must exactly match the specified string to either trigger or prevent triggering the automation.
88+
- For more precise control, use a regular expression (regex) format: `r/REGEX_PATTERN/`.
89+
90+
**Default Behavior:**
91+
92+
- Implicit triggers are the default behavior if the automation doesn't have explicit triggers configured.
93+
- The automation runs for all branches and repositories if neither include nor exclude is specified.
94+
95+
**Exclude/Include prioritization**
96+
97+
- Exclude overrides the include option. Thus, a repo will be excluded when it matches the include and exclude lists.
98+
99+
In the following example, the automations in the file will be triggered for all repositories that contain the string `feature`, except for the repository `my_feature`
100+
```yaml+jinja
101+
triggers:
102+
include:
103+
repository:
104+
- r/feature/
105+
exclude:
106+
repository:
107+
- my_feature
108+
```
109+
85110
## Action-Level Execution Control
86111
87112
gitStream provides intelligent action-level execution control that automatically skips certain actions based on the original triggering event. This feature helps reduce noise and ensures that AI-powered and code-related actions only execute when there are actual code changes, improving efficiency across all supported providers (GitLab, Bitbucket, and GitHub).
@@ -146,32 +171,7 @@ automations:
146171

147172
With implicit triggers (no explicit triggers configured), `describe-changes` will only execute when the automation is triggered by code changes, while `add-reviewers` follows the current default behavior.
148173

149-
**Note on Matching:**
150-
151-
- When using a `String` as the matching type, the values in `triggers.include.*` and `triggers.exclude.*` require exact matches. This means that the names of branches or repositories must exactly match the specified string to either trigger or prevent triggering the automation.
152-
- For more precise control, use a regular expression (regex) format: `r/REGEX_PATTERN/`.
153-
154-
**Default Behavior:**
155-
156-
- Implicit triggers are the default behavior if the automation doesn't have explicit triggers configured.
157-
- The automation runs for all branches and repositories if neither include nor exclude is specified.
158-
159-
**Exclude/Include prioritization**
160-
161-
- Exclude overrides the include option. Thus, a repo will be excluded when it matches the include and exclude lists.
162-
163-
In the following example, the automations in the file will be triggered for all repositories that contain the string `feature`, except for the repository `my_feature`
164-
```yaml+jinja
165-
triggers:
166-
include:
167-
repository:
168-
- r/feature/
169-
exclude:
170-
repository:
171-
- my_feature
172-
```
173-
174-
### Examples
174+
## Examples
175175

176176
#### Dependabot and Renovate
177177

0 commit comments

Comments
 (0)