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
Copy file name to clipboardExpand all lines: docs/execution-model.md
+83-28Lines changed: 83 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -60,30 +60,6 @@ The table below lists supported explicit triggers, categorized into those enable
60
60
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.
61
61
If an automation block does not have explicit triggers configured, it will be triggered according to the default (implicit) triggers.
62
62
63
-
Usage example:
64
-
65
-
```yaml+jinja
66
-
triggers:
67
-
on:
68
-
- pr_created
69
-
- commit
70
-
exclude:
71
-
branch:
72
-
- hotfix
73
-
74
-
automations:
75
-
skip_github_action_label:
76
-
on:
77
-
- label_added
78
-
if:
79
-
- {{ pr.labels | match(term='experimental') | some }}
80
-
run:
81
-
- action: add-github-check@v1
82
-
args:
83
-
check_name: production-ci
84
-
conclusion: skipped
85
-
```
86
-
87
63
**Note on Matching:**
88
64
89
65
- 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.
@@ -111,7 +87,81 @@ automations:
111
87
112
88
### Examples
113
89
114
-
- Assign code expert reviewer when the PR is created and after each commit. Ignore branches with the string "hotfix" in them
90
+
#### Dependabot and Renovate
91
+
92
+
For example, you can have your normal automations that help developers with their PRs and a separate automation that automates Dependabot or Renovate version bumps. Both automations serve distinctly different purposes: the first helps your developers streamline their PRs, while the other reduces developers' toil by auto-approving version bumps. You will not want to trigger gitStream for Dependabot or Renovate unnecessarily, so you can configure the triggers to exclude the branch where Dependabot or Renovate PRs are created.
93
+
94
+
!!! warning "Required gitStream Plugins"
95
+
This example requires you to install the [`extractDependabotVersionBump`](/filter-function-plugins/#extractdependabotversionbump) and [`compareSemver`](/filter-function-plugins/#comparesemver) plugins.
96
+
97
+
In your default automation file, you should exclude the branch where Dependabot or Renovate PRs are created:
98
+
99
+
```yaml+jinja title="gitstream.cm"
100
+
manifest:
101
+
version: 1.0
102
+
103
+
# Disable triggering when the PR is created by bots
104
+
triggers:
105
+
exclude:
106
+
branch:
107
+
- r/(Dependabot|dependabot|Renovate|renovate)/
108
+
109
+
# The default automations for developers below
110
+
automations:
111
+
estimated_time_to_review:
112
+
if:
113
+
- true
114
+
run:
115
+
- action: add-label@v1
116
+
args:
117
+
label: "{{ calc.etr }} min review"
118
+
...
119
+
```
120
+
121
+
And the other automations file is set to automate Dependabot PRs:
Assign code expert reviewer when the PR is created and after each commit. Ignore branches with the string "hotfix" in them.
164
+
115
165
```yaml+jinja
116
166
triggers:
117
167
on:
@@ -131,8 +181,10 @@ automations:
131
181
reviewers: {{ repo | codeExperts(gt=10) }}
132
182
```
133
183
134
-
- Explain code experts only if the label “suggest-reviewer” exists.
135
-
The automation will be triggered after each commit and after each label addition. If the label “suggest-reviewer” exists, it will trigger the `explain-code-experts` automation
184
+
#### Explain code experts
185
+
186
+
Explain code experts only if the label “suggest-reviewer” exists. The automation will be triggered after each commit and after each label addition. If the label “suggest-reviewer” exists, it will trigger the `explain-code-experts` automation.
187
+
136
188
```yaml+jinja
137
189
triggers:
138
190
on:
@@ -150,7 +202,10 @@ automations:
150
202
gt: 10
151
203
```
152
204
153
-
- Trigger only specific automations branch pattern A, and trigger other automation for all other branches except those that fit the pattern REGEX_PATTERN
205
+
#### Branch regex pattern
206
+
207
+
Trigger only specific automations branch pattern A, and trigger other automation for all other branches except those that fit the pattern REGEX_PATTERN
208
+
154
209
```yaml+jinja
155
210
# Automation in this file will trigger only for branch pattern REGEX_PATTERN
0 commit comments