From 12abccc9aad1edea2af0eb551ee41299b5d1892e Mon Sep 17 00:00:00 2001 From: Ofer Affias Date: Sun, 27 Jul 2025 17:15:27 +0300 Subject: [PATCH] Update gitStream documentation and remove explicit trigger configurations from CMs based on new feature that skips execution with Action-Level Execution Control --- .../integrations/LinearBAI/code-review.cm | 6 ++---- .../integrations/LinearBAI/describe-pr.cm | 9 +++------ .../ai-assistance/comment_ai_prompt.cm | 6 +++--- docs/downloads/gitstream.cm | 20 ++++++------------- docs/downloads/sales_demo.cm | 10 +++++----- docs/execution-model.md | 6 ++++-- 6 files changed, 23 insertions(+), 34 deletions(-) diff --git a/docs/downloads/automation-library/integrations/LinearBAI/code-review.cm b/docs/downloads/automation-library/integrations/LinearBAI/code-review.cm index 028c52312..8b3d326d0 100644 --- a/docs/downloads/automation-library/integrations/LinearBAI/code-review.cm +++ b/docs/downloads/automation-library/integrations/LinearBAI/code-review.cm @@ -3,10 +3,8 @@ manifest: automations: linearb_ai_review: - # Trigger it only when PR is created or has new commits - on: - - pr_created - - commit + # Triggers only when PR is created or has new commits, see docs + # https://docs.gitstream.cm/execution-model/#action-level-execution-control if: - {{ not pr.draft }} - {{ not (is.bot_author or is.bot_branch) }} diff --git a/docs/downloads/automation-library/integrations/LinearBAI/describe-pr.cm b/docs/downloads/automation-library/integrations/LinearBAI/describe-pr.cm index 80a351e10..ab5a55092 100644 --- a/docs/downloads/automation-library/integrations/LinearBAI/describe-pr.cm +++ b/docs/downloads/automation-library/integrations/LinearBAI/describe-pr.cm @@ -3,12 +3,9 @@ manifest: automations: linearb_ai_description: - # Trigger it only when PR is created or has new commits - # Note: explicit triggers are ignored for GitLab or Bitbucket - on: - - pr_created - - commit - # skip description for Draft PRs and PRs from bots + # Triggers only when PR is created or has new commits, see docs + # https://docs.gitstream.cm/execution-model/#action-level-execution-control + # Skip description for Draft PRs and PRs from bots if: - {{ not pr.draft }} - {{ not (is.bot_author or is.bot_branch) }} diff --git a/docs/downloads/automation-library/integrations/ai-assistance/comment_ai_prompt.cm b/docs/downloads/automation-library/integrations/ai-assistance/comment_ai_prompt.cm index 4c08b1e9d..c512e3705 100644 --- a/docs/downloads/automation-library/integrations/ai-assistance/comment_ai_prompt.cm +++ b/docs/downloads/automation-library/integrations/ai-assistance/comment_ai_prompt.cm @@ -6,7 +6,7 @@ manifest: triggers: on: - pr_created - + automations: comment_ai_assistance_prompt: # Post a comment for all PRs to prompt the PR author to indicate whether they used AI to assist coding in this PR @@ -22,14 +22,14 @@ automations: - [ ] GitHub Copilot - [ ] Cursor + - [ ] Zed - [ ] Tabnine - [ ] JetBrains AI Assistant - [ ] VSCode IntelliCode - [ ] ChatGPT - - [ ] Claude + - [ ] Claude Code - [ ] Gemini - [ ] Other AI tool - [ ] No AI tools were used Tip: If you want to avoid this comment in the future, you can add a label of the format `🤖 ai-*` when creating your PR. - diff --git a/docs/downloads/gitstream.cm b/docs/downloads/gitstream.cm index f246fcaaf..e40f71fa2 100644 --- a/docs/downloads/gitstream.cm +++ b/docs/downloads/gitstream.cm @@ -6,27 +6,21 @@ manifest: automations: + # Use LinearB's AI service to review the changes linearb_ai_review: - on: - - pr_created - - commit if: - - {{ not pr.draft }} - - {{ not is.bot }} + - {{ not (pr.draft or is.bot) }} run: - action: code-review@v1 args: approve_on_LGTM: {{ calc.safe_changes }} + # Use LinearB's AI service to add a description to the PR linearb_ai_description: - on: - - pr_created - - commit if: - - {{ not pr.draft }} - - {{ not is.bot }} + - {{ not (pr.draft or is.bot) }} run: - action: describe-changes@v1 args: @@ -41,6 +35,7 @@ automations: args: label: "{{ calc.etr }} min review" color: {{ colors.red if (calc.etr >= 20) else ( colors.yellow if (calc.etr >= 5) else colors.green ) }} + # Inform PR authors when they fail to reference Jira tickets in the PR title or description. label_missing_jira_info: if: @@ -55,12 +50,9 @@ automations: comment: | This PR is missing a Jira ticket reference in the title or description. Please add a Jira ticket reference to the title or description of this PR. + # Post a comment that lists the best experts for the files that were modified. explain_code_experts: - on: - - pr_created - - pr_ready_for_review - - commit if: - true run: diff --git a/docs/downloads/sales_demo.cm b/docs/downloads/sales_demo.cm index 751fe3668..a2761ff9f 100644 --- a/docs/downloads/sales_demo.cm +++ b/docs/downloads/sales_demo.cm @@ -6,6 +6,7 @@ manifest: automations: + # Add a label that indicates how many minutes it will take to review the PR. estimated_time_to_review: if: @@ -15,6 +16,7 @@ automations: args: label: "{{ calc.etr }} min review" color: {{ colors.red if (calc.etr >= 20) else ( colors.yellow if (calc.etr >= 5) else colors.green ) }} + # Inform PR authors when they fail to reference Jira tickets in the PR title or description. label_missing_jira_info: if: @@ -29,8 +31,9 @@ automations: comment: | This PR is missing a Jira ticket reference in the title or description. Please add a Jira ticket reference to the title or description of this PR. + + # Detect PRs that contain the text '#copilot#' in the title, description, comments, or commit messages label_copilot: - # Detect PRs that contain the text '#copilot#' in the title, description, comments, or commit messages if: - {{ copilot_tag.pr_title or copilot_tag.pr_desc or copilot_tag.pr_comments or copilot_tag.commit_messages }} # Apply a label indicating the user has adopted Copilot @@ -38,12 +41,9 @@ automations: - action: add-label@v1 args: label: '🤖 Copilot' + # Post a comment that lists the best experts for the files that were modified. explain_code_experts: - on: - - pr_created - - pr_ready_for_review - - commit if: - true run: diff --git a/docs/execution-model.md b/docs/execution-model.md index 0cb7f5e07..cd4d30021 100644 --- a/docs/execution-model.md +++ b/docs/execution-model.md @@ -1,7 +1,9 @@ # Trigger Control -!!! warning "GitHub Only Feature :fontawesome-brands-github:" - Explicit triggers (using `on`, `triggers.on`, `triggers.include`, and `triggers.exclude` parameters) are only supported on GitHub. Using explicit triggers in GitLab or Bitbucket will cause the automation to fail with an error. For GitLab and Bitbucket, simply omit trigger configuration to use implicit triggers automatically. +!!! warning "Platform Limitations" + **Explicit triggers** (using `on`, `triggers.on`, `triggers.include`, and `triggers.exclude` parameters) are only supported on GitHub :fontawesome-brands-github:. Using explicit triggers in GitLab or Bitbucket will cause the automation to fail with an error. For GitLab and Bitbucket, simply omit trigger configuration to use implicit triggers automatically. + + However, other execution control concepts covered in this document, such as action-level execution control, apply to all supported platforms (GitHub, GitLab, and Bitbucket). gitStream is triggered on new pull requests (PRs) for repositories that have gitStream installed. Upon triggering, gitStream collects context variables and evaluates the automation rules to determine which ones are relevant.