Skip to content

Commit 79beda4

Browse files
vlussenburgvim-zz
andauthored
Add minimal gS for BB and GL (#828)
* Refactor automation settings in gitstream-bb.cm Updated automation configurations to enhance code review and PR description processes. * Refactor AI service actions and comments in config Updated AI service actions and added consolidated comments for PRs. * Update code review guidelines in gitstream-bb.cm Removed specific guidelines from code review actions. * Update code review guidelines to focus on critical issues Removed nitpicking guidelines from code review actions. * Modify experts filter in gitStream-gl.cm Updated the experts filter to remove the top limit. * Remove top limit for code experts in configuration --------- Co-authored-by: Ofer Affias <ofer@linearb.io>
1 parent e702feb commit 79beda4

2 files changed

Lines changed: 59 additions & 105 deletions

File tree

docs/downloads/gitStream-gl.cm

Lines changed: 29 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,61 @@
11
# -*- mode: yaml -*-
2-
# This example configuration provides basic automations to get started with gitStream.
3-
# View the gitStream quickstart for more examples: https://docs.gitstream.cm/examples/
42
manifest:
53
version: 1.0
64

7-
85
automations:
9-
# Use LinearB's AI service to review the changes
10-
linearb_ai_review:
6+
linearb_ai_codereview:
117
if:
12-
- {{ not pr.draft }}
138
- {{ not is.bot }}
149
run:
1510
- action: code-review@v1
1611
args:
17-
approve_on_LGTM: {{ calc.safe_changes }}
12+
guidelines: |
13+
- Keep suggestions short and actionable.
1814
19-
# Use LinearB's AI service to add a description to the PR
20-
linearb_ai_description:
15+
pr_policy_low_noise:
2116
if:
2217
- {{ not pr.draft }}
23-
- {{ not (is.bot_author or is.bot_branch) }}
18+
- {{ not is.bot }}
2419
run:
20+
# AI description (updates PR body; not a comment)
2521
- action: describe-changes@v1
2622
args:
2723
concat_mode: append
2824

29-
# Add a label indicating how long it will take to review the PR.
30-
estimated_time_to_review:
31-
if:
32-
- true
33-
run:
34-
- action: add-label@v1
25+
# Assign reviewers silently
26+
- action: add-reviewers@v1
3527
args:
36-
label: "{{ calc.etr }} min review"
37-
color: {{ colors.red if (calc.etr >= 20) else ( colors.yellow if (calc.etr >= 5) else colors.green ) }}
38-
# Inform PR authors when they fail to reference Jira tickets in the PR title or description.
39-
label_missing_jira_info:
40-
if:
41-
- {{ not (has.jira_ticket_in_title or has.jira_ticket_in_desc) }}
42-
run:
43-
- action: add-label@v1
44-
args:
45-
label: "missing-jira"
46-
color: {{ colors.red }}
28+
reviewers: {{ who.experts }}
29+
30+
# ONE consolidated, updatable comment
4731
- action: add-comment@v1
4832
args:
4933
comment: |
50-
This PR is missing a Jira ticket reference in the title or description.
51-
Please add a Jira ticket reference to the title or description of this PR.
52-
# Post a comment that lists the best experts for the files that were modified.
53-
explain_code_experts:
54-
if:
55-
- true
56-
run:
57-
- action: explain-code-experts@v1
58-
args:
59-
gt: 10
34+
## gitStream Summary — Low Noise (Staff Engineer focus)
6035
36+
**AI PR Description:** Updated in the PR body above.
37+
**ETR:** {{ calc.etr }} min review
38+
**Unresolved threads:** {{ pr.unresolved_threads | default(value=0) }}
39+
**JIRA:** {{ '✅ Found in title/description.' if (has.jira_ticket_in_title or has.jira_ticket_in_desc) else '⚠️ Missing Jira ticket. Please add one (e.g., `ABC-123` or an `atlassian.net/browse/...` link).' }}
6140
62-
# +----------------------------------------------------------------------------+
63-
# | Custom Expressions |
64-
# | https://docs.gitstream.cm/how-it-works/#custom-expressions |
65-
# +----------------------------------------------------------------------------+
41+
### Suggested Reviewers (auto-assigned)
42+
{{ who.experts }}
6643
44+
# ----------------- config -----------------
6745
calc:
6846
etr: {{ branch | estimatedReviewTime }}
69-
safe_changes: {{ is.formatting or is.docs or is.tests or is.image }}
7047

7148
has:
72-
jira_ticket_in_title: {{ pr.title | includes(regex=r/\b[A-Za-z]+-\d+\b/) }}
73-
jira_ticket_in_desc: {{ pr.description | includes(regex=r/atlassian.net\/browse\/\w{1,}-\d{3,4}/) }}
49+
jira_ticket_in_title: {{ pr.title | includes(regex=r/\b[A-Za-z][A-Za-z0-9_]+-\d+\b/) }}
50+
jira_ticket_in_desc: {{ pr.description | includes(regex=r/\b[A-Za-z][A-Za-z0-9_]+-\d+\b/) }}
7451

75-
colors:
76-
red: 'b60205'
77-
yellow: 'fbca04'
78-
green: '0e8a16'
52+
who:
53+
experts: {{ repo | codeExperts(gt=10) }}
7954

8055
is:
81-
formatting: {{ source.diff.files | isFormattingChange }}
82-
docs: {{ files | allDocs }}
83-
tests: {{ files | allTests }}
84-
image: {{ files | allImages }}
85-
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
86-
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
56+
bot: {{ pr.author | match(list=['github-actions','_bot_','[bot]','dependabot','gitstream-cm','prvalidation','aida-bot']) | some }}
57+
58+
colors:
59+
red: 'b60205'
60+
yellow: 'fbca04'
61+
green: '0e8a16'

docs/downloads/gitstream-bb.cm

Lines changed: 30 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,61 @@
11
# -*- mode: yaml -*-
2-
# This example configuration provides basic automations to get started with gitStream.
3-
# View the gitStream quickstart for more examples: https://docs.gitstream.cm/examples/
42
manifest:
53
version: 1.0
64

7-
85
automations:
9-
# Use LinearB's AI service to review the changes
10-
linearb_ai_review:
6+
linearb_ai_codereview:
117
if:
12-
- {{ not pr.draft }}
13-
- {{ not (is.bot_author or is.bot_branch) }}
8+
- {{ not is.bot }}
149
run:
1510
- action: code-review@v1
1611
args:
17-
approve_on_LGTM: {{ calc.safe_changes }}
12+
guidelines: |
13+
- Keep suggestions short and actionable.
1814
19-
# Use LinearB's AI service to add a description to the PR
20-
linearb_ai_description:
15+
pr_policy_low_noise:
2116
if:
2217
- {{ not pr.draft }}
23-
- {{ not (is.bot_author or is.bot_branch) }}
18+
- {{ not is.bot }}
2419
run:
20+
# AI description (updates PR body; not a comment)
2521
- action: describe-changes@v1
2622
args:
2723
concat_mode: append
2824

29-
# Add a label indicating how long it will take to review the PR.
30-
estimated_time_to_review:
31-
if:
32-
- true
33-
run:
34-
- action: add-comment@v1
25+
# Assign reviewers silently
26+
- action: add-reviewers@v1
3527
args:
36-
comment: "{{ calc.etr }} min review"
28+
reviewers: {{ who.experts }}
3729

38-
# Request changes by PR authors when they fail to reference Jira tickets in the PR title or description.
39-
request_missing_jira_info:
40-
if:
41-
- {{ not (has.jira_ticket_in_title or has.jira_ticket_in_desc) }}
42-
run:
43-
- action: request-changes@v1
30+
# ONE consolidated, updatable comment
31+
- action: add-comment@v1
4432
args:
4533
comment: |
46-
This PR is missing a Jira ticket reference in the title or description.
47-
Please add a Jira ticket reference to the title or description of this PR.
48-
# Post a comment that lists the best experts for the files that were modified.
49-
explain_code_experts:
50-
if:
51-
- true
52-
run:
53-
- action: explain-code-experts@v1
54-
args:
55-
gt: 10
34+
## gitStream Summary — Low Noise (Staff Engineer focus)
5635
36+
**AI PR Description:** Updated in the PR body above.
37+
**ETR:** {{ calc.etr }} min review
38+
**Unresolved threads:** {{ pr.unresolved_threads | default(value=0) }}
39+
**JIRA:** {{ '✅ Found in title/description.' if (has.jira_ticket_in_title or has.jira_ticket_in_desc) else '⚠️ Missing Jira ticket. Please add one (e.g., `ABC-123` or an `atlassian.net/browse/...` link).' }}
5740
58-
# +----------------------------------------------------------------------------+
59-
# | Custom Expressions |
60-
# | https://docs.gitstream.cm/how-it-works/#custom-expressions |
61-
# +----------------------------------------------------------------------------+
41+
### Suggested Reviewers (auto-assigned)
42+
{{ who.experts }}
6243
44+
# ----------------- config -----------------
6345
calc:
6446
etr: {{ branch | estimatedReviewTime }}
65-
safe_changes: {{ is.formatting or is.docs or is.tests or is.image }}
6647

6748
has:
68-
jira_ticket_in_title: {{ pr.title | includes(regex=r/\b[A-Za-z]+-\d+\b/) }}
69-
jira_ticket_in_desc: {{ pr.description | includes(regex=r/atlassian.net\/browse\/\w{1,}-\d{3,4}/) }}
49+
jira_ticket_in_title: {{ pr.title | includes(regex=r/\b[A-Za-z][A-Za-z0-9_]+-\d+\b/) }}
50+
jira_ticket_in_desc: {{ pr.description | includes(regex=r/\b[A-Za-z][A-Za-z0-9_]+-\d+\b/) }}
7051

71-
colors:
72-
red: 'b60205'
73-
yellow: 'fbca04'
74-
green: '0e8a16'
52+
who:
53+
experts: {{ repo | codeExperts(gt=10) }}
7554

7655
is:
77-
formatting: {{ source.diff.files | isFormattingChange }}
78-
docs: {{ files | allDocs }}
79-
tests: {{ files | allTests }}
80-
image: {{ files | allImages }}
81-
bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
82-
bot_branch: {{ branch.name | match(list=['renovate/']) | some }}
56+
bot: {{ pr.author | match(list=['github-actions','_bot_','[bot]','dependabot','gitstream-cm','prvalidation','aida-bot']) | some }}
57+
58+
colors:
59+
red: 'b60205'
60+
yellow: 'fbca04'
61+
green: '0e8a16'

0 commit comments

Comments
 (0)