Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ manifest:

automations:
approve_dependabot:
on:
- pr_created
- commit
if:
- {{ branch.name | includes(term="dependabot") }}
- {{ branch.author | includes(term="dependabot") }}
Expand All @@ -16,4 +19,4 @@ automations:
- action: merge@v1
args:
wait_for_all_checks: true
squash_on_merge: true
squash_on_merge: true
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ manifest:

automations:
merge_dependabot_minor:
on:
- pr_created
- commit
if:
- {{ bump == 'minor' }}
- {{ branch.name | includes(term="dependabot") }}
Expand All @@ -14,6 +17,9 @@ automations:
comment: |
Dependabot `minor` version bumps are approved automatically.
merge_dependabot_minor_patch:
on:
- pr_created
- commit
if:
- {{ bump == 'patch' }}
- {{ branch.name | includes(term="dependabot") }}
Expand All @@ -26,4 +32,4 @@ automations:
comment: |
Dependabot `patch` version bumps are approved and merged automatically.

bump: {{ pr.description | extractDependabotVersionBump | compareSemver }}
bump: {{ pr.description | extractDependabotVersionBump | compareSemver }}
10 changes: 10 additions & 0 deletions docs/execution-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,19 @@ The `triggers` section in gitStream gives you precise control over when automati

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

<div class="trigger-details" markdown=1>
| Key | Type | Description |
| ----------------------------------------------------- | ----------------- | -------------------------------------------------------------- |
| `triggers.on` :fontawesome-brands-github: | [String] | Specifies the explicit triggers that initiate the automations. |
| `triggers.include.branch` :fontawesome-brands-github: | [String or regex] | Branches that match will trigger the automation. |
| `triggers.exclude.branch` :fontawesome-brands-github: | [String or regex] | Branches that match will not trigger the automation. |
| `triggers.include.repository` | [String or regex] | Repositories that match will trigger the automation. |
| `triggers.exclude.repository` | [String or regex] | Repositories that match will not trigger the automation. |
</div>

The table below lists supported explicit triggers, categorized into those enabled by default and those that require manual activation.

<div class="trigger-details" markdown=1>
| Triggering event | Explicit Trigger :fontawesome-brands-github: | Default (implicit triggers) |
| --------------------------------------------------------------------- | -------------------------------------------- | ------------------------------ |
| Creating a PR | `pr_created` | `on` |
Expand All @@ -67,6 +70,7 @@ The table below lists supported explicit triggers, categorized into those enable
| :fontawesome-brands-github: transition from any state to closed | `pr_closed` | `off` |
| :fontawesome-brands-github: transition from closed to open | `pr_reopened` | `off` |
| :fontawesome-brands-github: Transition from any state to approved | `pr_approved` | If there is an automation with one of the actions: `require-reviewers`, `set-required-approvals` or `merge`, or uses `pr.approvals` context variable |
</div>

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

automations:
bump_minor:
on:
- pr_created
- commit
if:
- {{ bump == 'minor' }}
- {{ branch.name | includes(term="dependabot") }}
Expand All @@ -157,6 +164,9 @@ automations:
Dependabot `minor` version bumps are approved automatically.

bump_patch:
on:
- pr_created
- commit
if:
- {{ bump == 'patch' }}
- {{ branch.name | includes(term="dependabot") }}
Expand Down
12 changes: 8 additions & 4 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

h2 {
padding-top: 4%;
}
}

h4 {
padding-top: 4%;
}
}

/* make the first column wider as usually this is a variable name that cant wrap normally */
th:nth-child(1){
Expand All @@ -24,6 +24,10 @@ div.filter-details th:nth-child(1){
width: 20%;
}

div.trigger-details th:nth-child(2){
width: 30%;
}

/* change the table colors for light mode */
[data-md-color-scheme="default"] table th{
background: #D8DADE;
Expand Down Expand Up @@ -104,7 +108,7 @@ div.flow-chart {
color: gray;
}

.tabbed-content .md-typeset .admonition {
.tabbed-content .md-typeset .admonition {
font-size: .8rem;
}

Expand Down Expand Up @@ -178,7 +182,7 @@ div.flow-chart {
width:auto;
height: 3em;
}

.integrations-card-labels {
font-size: 0.7em;
color: #9aa4ad; /* this is a medium grey color */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ manifest:

automations:
bump_minor:
on:
- pr_created
- commit
if:
- {{ bump == 'minor' }}
- {{ branch.name | includes(term="dependabot") }}
Expand All @@ -15,6 +18,9 @@ automations:
Dependabot `minor` version bumps are approved automatically.

bump_patch:
on:
- pr_created
- commit
if:
- {{ bump == 'patch' }}
- {{ branch.name | includes(term="dependabot") }}
Expand Down