diff --git a/docs/automations/integrations/dependabot/approve-dependabot/README.md b/docs/automations/integrations/dependabot/approve-dependabot/README.md index 4a5a578a..a3de65b2 100644 --- a/docs/automations/integrations/dependabot/approve-dependabot/README.md +++ b/docs/automations/integrations/dependabot/approve-dependabot/README.md @@ -3,30 +3,63 @@ title: gitStream Automation - Approve and Merge Dependabot Changes description: Automatically approve and merge Dependabot PRs. --- # Approve and Merge Dependabot Changes + +Auto-merge Dependabot PRs -Approve PRs from Dependabot +=== "All Updates" + !!! info "Configuration Description" -Conditions (all must be true): + Conditions (all must be true): -* The PR author is Dependabot. -* The branch name includes 'dependabot' + * The PR author is Dependabot. + * The branch name includes 'dependabot' -Automation Actions: + Automation Actions: -* Approve the PR -* Apply an `approved-dependabot` label to the PR -* Merge the PR if all status checks pass. + * Approve the PR + * Apply an `approved-dependabot` label to the PR + * Merge the PR if all status checks pass. -!!! example "Approve Dependabot" - ```yaml+jinja - --8<-- "docs/downloads/automation-library/integrations/dependabot/approve_dependabot.cm" - ``` -
- - [:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/dependabot/approve_dependabot.cm){ .md-button } - -
+ !!! example "Configuration Example" + ```yaml+jinja + --8<-- "docs/downloads/automation-library/integrations/dependabot/approve_dependabot.cm" + ``` +
+ + [:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/dependabot/approve_dependabot.cm){ .md-button } + +
+=== "By Release Type" + !!! warning "Required gitStream Plugins" + This example requires you to install the [`extractDependabotVersionBump`](/filter-function-plugins/#extractdependabotversionbump) and [compareSemver](http://127.0.0.1:8000/filter-function-plugins/#comparesemver) plugins. + + [Learn more about gitStream plugins](/plugins/). + !!! info "Configuration Description" + + Conditions (all must be true): + + * The PR author is Dependabot. + * The branch name includes 'dependabot' + * The dependency change is a patch or minor update. + + Automation Actions: + + * Approve the PR + * Apply an `approved-dependabot` label to the PR + * Merge the PR if all status checks pass. + + !!! example "Configuration Example" + ```yaml+jinja + --8<-- "docs/downloads/automation-library/integrations/dependabot/approve_dependabot_minor.cm" + ``` +
+ + [:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/dependabot/approve_dependabot_minor.cm){ .md-button } + +
+ + diff --git a/docs/automations/integrations/renovate/approve-renovate/README.md b/docs/automations/integrations/renovate/approve-renovate/README.md new file mode 100644 index 00000000..47fe43e2 --- /dev/null +++ b/docs/automations/integrations/renovate/approve-renovate/README.md @@ -0,0 +1,35 @@ +--- +title: gitStream Automation - Approve and Merge Renovate Changes +description: Automatically approve and merge Renovate PRs. +--- +# Approve and Merge Renovate Changes + + +Approve PRs from Renovate + +![Approve and Merge Renovate Changes](/automations/integrations/renovate/approve-renovate/approve-renovate.png) + +!!! info "Configuration Description" + + **Conditions (all must be true):** + + * The PR author is Mend Renovate. + + **Automation Actions:** + + * Approve the PR + * Apply an `approved-renovate` label to the PR + * Merge the PR if all status checks pass. + +
+!!! example "Approve Renovate" + ```yaml+jinja + --8<-- "docs/downloads/automation-library/integrations/renovate/approve-renovate/approve_renovate.cm" + ``` +
+ + [:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/renovate/approve-renovate/approve_renovate.cm){ .md-button } + +
+ + diff --git a/docs/automations/integrations/renovate/approve-renovate/approve-renovate.png b/docs/automations/integrations/renovate/approve-renovate/approve-renovate.png new file mode 100644 index 00000000..0b7b8dfe Binary files /dev/null and b/docs/automations/integrations/renovate/approve-renovate/approve-renovate.png differ diff --git a/docs/automations/integrations/snyk/approve-snyk/README.md b/docs/automations/integrations/snyk/approve-snyk/README.md new file mode 100644 index 00000000..b5492644 --- /dev/null +++ b/docs/automations/integrations/snyk/approve-snyk/README.md @@ -0,0 +1,35 @@ +--- +title: gitStream Automation - Approve and Merge Snyk Changes +description: Automatically approve and merge Snyk PRs. +--- +# Approve and Merge Snyk Changes + + +Approve PRs from Snyk + +![Approve and Merge Snyk Changes](/automations/integrations/snyk/approve-snyk/approve-snyk.png) + +!!! info "Configuration Description" + + **Conditions (all must be true):** + + * The PR author is Snyk. + + **Automation Actions:** + + * Approve the PR + * Apply an `approved-snyk` label to the PR + * Merge the PR if all status checks pass. + +
+!!! example "Approve Snyk" + ```yaml+jinja + --8<-- "docs/downloads/automation-library/integrations/snyk/approve-snyk/approve_snyk.cm" + ``` +
+ + [:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/snyk/approve-snyk/approve_snyk.cm){ .md-button } + +
+ + diff --git a/docs/automations/integrations/snyk/approve-snyk/approve-snyk.png b/docs/automations/integrations/snyk/approve-snyk/approve-snyk.png new file mode 100644 index 00000000..c68b1f7b Binary files /dev/null and b/docs/automations/integrations/snyk/approve-snyk/approve-snyk.png differ diff --git a/docs/downloads/automation-library/integrations/dependabot/approve_dependabot_minor.cm b/docs/downloads/automation-library/integrations/dependabot/approve_dependabot_minor.cm new file mode 100644 index 00000000..247dd9f5 --- /dev/null +++ b/docs/downloads/automation-library/integrations/dependabot/approve_dependabot_minor.cm @@ -0,0 +1,29 @@ +manifest: + version: 1.0 + +automations: + merge_dependabot_minor: + if: + - {{ bump == 'minor' }} + - {{ branch.name | includes(term="dependabot") }} + - {{ branch.author | includes(term="dependabot") }} + run: + - action: approve@v1 + - action: add-comment@v1 + args: + comment: | + Dependabot `minor` version bumps are approved automatically. + merge_dependabot_minor_patch: + if: + - {{ bump == 'patch' }} + - {{ branch.name | includes(term="dependabot") }} + - {{ branch.author | includes(term="dependabot") }} + run: + - action: approve@v1 + - action: merge@v1 + - action: add-comment@v1 + args: + comment: | + Dependabot `patch` version bumps are approved and merged automatically. + +bump: {{ pr.description | extractDependabotVersionBump | compareSemver }} \ No newline at end of file diff --git a/docs/downloads/automation-library/integrations/renovate/approve-renovate/approve_renovate.cm b/docs/downloads/automation-library/integrations/renovate/approve-renovate/approve_renovate.cm new file mode 100644 index 00000000..8668b096 --- /dev/null +++ b/docs/downloads/automation-library/integrations/renovate/approve-renovate/approve_renovate.cm @@ -0,0 +1,18 @@ +# -*- mode: yaml -*- + +manifest: + version: 1.0 + +automations: + approve_renovate: + if: + - {{ branch.author | includes(term="renovate") }} + run: + - action: approve@v1 + - action: add-label@v1 + args: + label: "approved-renovate" + - action: merge@v1 + args: + wait_for_all_checks: true + squash_on_merge: true diff --git a/docs/downloads/automation-library/integrations/snyk/approve-snyk/approve_snyk.cm b/docs/downloads/automation-library/integrations/snyk/approve-snyk/approve_snyk.cm new file mode 100644 index 00000000..3ff5d1f8 --- /dev/null +++ b/docs/downloads/automation-library/integrations/snyk/approve-snyk/approve_snyk.cm @@ -0,0 +1,18 @@ +# -*- mode: yaml -*- + +manifest: + version: 1.0 + +automations: + approve_snyk: + if: + - {{ branch.author | includes(term="snyk") }} + run: + - action: approve@v1 + - action: add-label@v1 + args: + label: "approved-snyk" + - action: merge@v1 + args: + wait_for_all_checks: true + squash_on_merge: true diff --git a/docs/integrations/README.md b/docs/integrations/README.md index d9aaf76d..47f249de 100644 --- a/docs/integrations/README.md +++ b/docs/integrations/README.md @@ -76,6 +76,18 @@ description: Integrate third-party developer tools with gitStream.
+
+
+[:simple-renovatebot: Renovate](/integrations/renovate) +
+
+ +
+
+[:simple-snyk: Snyk](/integrations/snyk) +
+
+ ## Project Management diff --git a/docs/integrations/dependabot.md b/docs/integrations/dependabot.md index 0cb1e760..86287a10 100644 --- a/docs/integrations/dependabot.md +++ b/docs/integrations/dependabot.md @@ -5,4 +5,10 @@ description: Use gitStream to automatically approve and merge Dependabot PRs. # Integrate gitStream with Dependabot ## Approve and Merge Dependabot Changes ---8<-- "docs/automations/integrations/dependabot/approve-dependabot/README.md:6:" \ No newline at end of file +--8<-- "docs/automations/integrations/dependabot/approve-dependabot/README.md:example" + +## Additional Resources + +--8<-- "docs/snippets/general.md" + +--8<-- "docs/snippets/automation-footer.md" \ No newline at end of file diff --git a/docs/integrations/renovate.md b/docs/integrations/renovate.md new file mode 100644 index 00000000..4b26553e --- /dev/null +++ b/docs/integrations/renovate.md @@ -0,0 +1,9 @@ +--- +title: Integrate gitStream with Mend Renovate +description: Implement workflow automations for Mend Renovate. +--- +# Integrate gitStream with Mend Renovate + + +## Auto-Merge Renovate Dependency Updates +--8<-- "docs/automations/integrations/renovate/approve-renovate/README.md:example" \ No newline at end of file diff --git a/docs/integrations/snyk.md b/docs/integrations/snyk.md new file mode 100644 index 00000000..a4a19c0f --- /dev/null +++ b/docs/integrations/snyk.md @@ -0,0 +1,9 @@ +--- +title: Integrate gitStream with Snyk +description: Implement workflow automations for Snyk. +--- +# Integrate gitStream with Snyk + + +## Auto-Merge Snyk Dependency Updates +--8<-- "docs/automations/integrations/snyk/approve-snyk/README.md:example" \ No newline at end of file