From 673ecc1acd944e05366a94c7346e76919545584a Mon Sep 17 00:00:00 2001 From: Pavel Vaks <129676672+PavelLinearB@users.noreply.github.com> Date: Wed, 7 May 2025 14:17:49 +0300 Subject: [PATCH 1/3] Update dry-run-mode.md --- docs/dry-run-mode.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/dry-run-mode.md b/docs/dry-run-mode.md index 29bb93648..ef05e44a9 100644 --- a/docs/dry-run-mode.md +++ b/docs/dry-run-mode.md @@ -2,17 +2,26 @@ title: How to Test gitStream Automations description: Use gitStream dry-run mode to test your automations before implementing them. --- + # How to Test Your Automation -By default, gitStream runs all applicable automations for every new PR and changes to existing PR. If you want to test and experiment with new rules, gitStream supports a dry-run mode that will avoid changing your PRs. When you commit changes to any CM files found inside your repo's `.cm/` directory, gitStream will switch to dry-run mode. +Testing your gitStream automations ensures they work as expected before applying them to your live pull requests. gitStream provides two easy ways to safely test your automations: + +### 1. Dry Run Mode -In dry-run mode, gitStream won't execute any automation rules on the PR. Instead, gitStream will try to parse all applicable automation rules and show an error in case of failure. When there are other changes outside the `cm` files, gitStream will post a comment to the PR discussion describing the actions to be taken for those changes. A new comment will be added after every new commit. +Dry Run mode is automatically enabled whenever you open a PR that modifies any of your `.cm` automation files. In Dry Run mode: -![dry-run mode](/screenshots/dry-run-mode.png) +- gitStream evaluates all automations without executing them. +- Results are added as comments on your pull request, showing exactly what actions would have occurred. +- Each new commit triggers an updated comment describing the changes. !!! note + While in Dry Run mode, no automation changes actually take effect. To apply your automations, merge your PR after validation. + +If you encounter issues while testing, refer to our [Troubleshooting page](troubleshooting.md) for guidance. - When in dry-run mode, incoming changes to the CM files are ignored. In other words, new automations and configurations will only take effect once you merge the PR. +### 2. Using the Playground -Once you are satisfied with the results, you can merge your CM changes into the main branch to enable the new configurations. +You can also test automations interactively using the [gitStream Playground](playground.md). The Playground offers an intuitive environment to preview how automations behave, allowing you to instantly adjust and perfect your rules. +Select the method most convenient for your workflow, or use both methods together for comprehensive testing. Once satisfied with the results, merge your `cm` changes into the main branch to enable the new automations. From c2504ef16f7859ff75a3c9773e6d348d79f41481 Mon Sep 17 00:00:00 2001 From: Pavel Vaks <129676672+PavelLinearB@users.noreply.github.com> Date: Wed, 7 May 2025 14:20:48 +0300 Subject: [PATCH 2/3] fix playground link --- docs/dry-run-mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dry-run-mode.md b/docs/dry-run-mode.md index ef05e44a9..8e5bc230b 100644 --- a/docs/dry-run-mode.md +++ b/docs/dry-run-mode.md @@ -22,6 +22,6 @@ If you encounter issues while testing, refer to our [Troubleshooting page](troub ### 2. Using the Playground -You can also test automations interactively using the [gitStream Playground](playground.md). The Playground offers an intuitive environment to preview how automations behave, allowing you to instantly adjust and perfect your rules. +You can also test automations interactively using the [gitStream Playground](gitStream-playground.md). The Playground offers an intuitive environment to preview how automations behave, allowing you to instantly adjust and perfect your rules. Select the method most convenient for your workflow, or use both methods together for comprehensive testing. Once satisfied with the results, merge your `cm` changes into the main branch to enable the new automations. From 617c60a292d989d9011f149b87af3cc0ec7d9d9a Mon Sep 17 00:00:00 2001 From: Pavel Vaks <129676672+PavelLinearB@users.noreply.github.com> Date: Wed, 7 May 2025 14:50:13 +0300 Subject: [PATCH 3/3] Update dry-run-mode.md --- docs/dry-run-mode.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/dry-run-mode.md b/docs/dry-run-mode.md index 8e5bc230b..86dec52b0 100644 --- a/docs/dry-run-mode.md +++ b/docs/dry-run-mode.md @@ -11,10 +11,13 @@ Testing your gitStream automations ensures they work as expected before applying Dry Run mode is automatically enabled whenever you open a PR that modifies any of your `.cm` automation files. In Dry Run mode: -- gitStream evaluates all automations without executing them. +- gitStream evaluates automations based on code changes made to non-automation files (your repository's codebase). +- Automations are evaluated without being executed. - Results are added as comments on your pull request, showing exactly what actions would have occurred. - Each new commit triggers an updated comment describing the changes. +![dry-run mode](/screenshots/dry-run-mode.png) + !!! note While in Dry Run mode, no automation changes actually take effect. To apply your automations, merge your PR after validation. @@ -24,4 +27,4 @@ If you encounter issues while testing, refer to our [Troubleshooting page](troub You can also test automations interactively using the [gitStream Playground](gitStream-playground.md). The Playground offers an intuitive environment to preview how automations behave, allowing you to instantly adjust and perfect your rules. -Select the method most convenient for your workflow, or use both methods together for comprehensive testing. Once satisfied with the results, merge your `cm` changes into the main branch to enable the new automations. +Select the method most convenient for your workflow, or use both methods together for comprehensive testing. Once satisfied with the results, merge your `.cm` changes into the main branch to enable the new automations.