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 @@ -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) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

20 changes: 6 additions & 14 deletions docs/downloads/gitstream.cm
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions docs/downloads/sales_demo.cm
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -29,21 +31,19 @@ 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
run:
- 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:
Expand Down
6 changes: 4 additions & 2 deletions docs/execution-model.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down