-
Notifications
You must be signed in to change notification settings - Fork 45
Add minimal gS for BB and GL #828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,86 +1,63 @@ | ||
| # -*- mode: yaml -*- | ||
| # This example configuration provides basic automations to get started with gitStream. | ||
| # View the gitStream quickstart for more examples: https://docs.gitstream.cm/examples/ | ||
| manifest: | ||
| version: 1.0 | ||
|
|
||
|
|
||
| automations: | ||
| # Use LinearB's AI service to review the changes | ||
| linearb_ai_review: | ||
| linearb_ai_codereview: | ||
| if: | ||
| - {{ not pr.draft }} | ||
| - {{ not is.bot }} | ||
| run: | ||
| - action: code-review@v1 | ||
| args: | ||
| approve_on_LGTM: {{ calc.safe_changes }} | ||
| guidelines: | | ||
| - Highlight **critical issues** only (correctness/logic, performance, security, maintainability blockers). | ||
| - Skip nitpicks; ignore null-reference risks that are known to be validated earlier in this code path. | ||
| - Keep suggestions short and actionable. | ||
| # Use LinearB's AI service to add a description to the PR | ||
| linearb_ai_description: | ||
| pr_policy_low_noise: | ||
| if: | ||
| - {{ not pr.draft }} | ||
| - {{ not (is.bot_author or is.bot_branch) }} | ||
| - {{ not is.bot }} | ||
| run: | ||
| # AI description (updates PR body; not a comment) | ||
| - action: describe-changes@v1 | ||
| args: | ||
| concat_mode: append | ||
|
|
||
| # Add a label indicating how long it will take to review the PR. | ||
| estimated_time_to_review: | ||
| if: | ||
| - true | ||
| run: | ||
| - action: add-label@v1 | ||
| # Assign reviewers silently | ||
| - action: add-reviewers@v1 | ||
| 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: | ||
| - {{ not (has.jira_ticket_in_title or has.jira_ticket_in_desc) }} | ||
| run: | ||
| - action: add-label@v1 | ||
| args: | ||
| label: "missing-jira" | ||
| color: {{ colors.red }} | ||
| reviewers: {{ who.experts }} | ||
|
|
||
| # ONE consolidated, updatable comment | ||
| - action: add-comment@v1 | ||
| args: | ||
| 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: | ||
| if: | ||
| - true | ||
| run: | ||
| - action: explain-code-experts@v1 | ||
| args: | ||
| gt: 10 | ||
| ## gitStream Summary — Low Noise (Staff Engineer focus) | ||
| **AI PR Description:** Updated in the PR body above. | ||
| **ETR:** {{ calc.etr }} min review | ||
| **Unresolved threads:** {{ pr.unresolved_threads | default(value=0) }} | ||
| **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).' }} | ||
| # +----------------------------------------------------------------------------+ | ||
| # | Custom Expressions | | ||
| # | https://docs.gitstream.cm/how-it-works/#custom-expressions | | ||
| # +----------------------------------------------------------------------------+ | ||
| ### Suggested Reviewers (auto-assigned) | ||
| {{ who.experts }} | ||
| # ----------------- config ----------------- | ||
| calc: | ||
| etr: {{ branch | estimatedReviewTime }} | ||
| safe_changes: {{ is.formatting or is.docs or is.tests or is.image }} | ||
|
|
||
| has: | ||
| jira_ticket_in_title: {{ pr.title | includes(regex=r/\b[A-Za-z]+-\d+\b/) }} | ||
| jira_ticket_in_desc: {{ pr.description | includes(regex=r/atlassian.net\/browse\/\w{1,}-\d{3,4}/) }} | ||
| jira_ticket_in_title: {{ pr.title | includes(regex=r/\b[A-Za-z][A-Za-z0-9_]+-\d+\b/) }} | ||
| jira_ticket_in_desc: {{ pr.description | includes(regex=r/\b[A-Za-z][A-Za-z0-9_]+-\d+\b/) }} | ||
|
|
||
| colors: | ||
| red: 'b60205' | ||
| yellow: 'fbca04' | ||
| green: '0e8a16' | ||
| who: | ||
| experts: {{ repo | codeExperts(gt=10, top=5) }} | ||
|
|
||
| is: | ||
| formatting: {{ source.diff.files | isFormattingChange }} | ||
| docs: {{ files | allDocs }} | ||
| tests: {{ files | allTests }} | ||
| image: {{ files | allImages }} | ||
| bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }} | ||
| bot_branch: {{ branch.name | match(list=['renovate/']) | some }} | ||
| bot: {{ pr.author | match(list=['github-actions','_bot_','[bot]','dependabot','gitstream-cm','prvalidation','aida-bot']) | some }} | ||
|
|
||
| colors: | ||
| red: 'b60205' | ||
| yellow: 'fbca04' | ||
| green: '0e8a16' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,82 +1,63 @@ | ||
| # -*- mode: yaml -*- | ||
| # This example configuration provides basic automations to get started with gitStream. | ||
| # View the gitStream quickstart for more examples: https://docs.gitstream.cm/examples/ | ||
| manifest: | ||
| version: 1.0 | ||
|
|
||
|
|
||
| automations: | ||
| # Use LinearB's AI service to review the changes | ||
| linearb_ai_review: | ||
| linearb_ai_codereview: | ||
| if: | ||
| - {{ not pr.draft }} | ||
| - {{ not (is.bot_author or is.bot_branch) }} | ||
| - {{ not is.bot }} | ||
| run: | ||
| - action: code-review@v1 | ||
| args: | ||
| approve_on_LGTM: {{ calc.safe_changes }} | ||
| guidelines: | | ||
| - Highlight **critical issues** only (correctness/logic, performance, security, maintainability blockers). | ||
| - Skip nitpicks; ignore null-reference risks that are known to be validated earlier in this code path. | ||
| - Keep suggestions short and actionable. | ||
|
Comment on lines
+12
to
+15
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do you want to use default guidelines? if needed we should improve the system prompts and leave this to the user
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's an exact copy paste from https://docs.gitstream.cm/github-installation/ :) |
||
| # Use LinearB's AI service to add a description to the PR | ||
| linearb_ai_description: | ||
| pr_policy_low_noise: | ||
| if: | ||
| - {{ not pr.draft }} | ||
| - {{ not (is.bot_author or is.bot_branch) }} | ||
| - {{ not is.bot }} | ||
| run: | ||
| # AI description (updates PR body; not a comment) | ||
| - action: describe-changes@v1 | ||
| args: | ||
| concat_mode: append | ||
|
|
||
| # Add a label indicating how long it will take to review the PR. | ||
| estimated_time_to_review: | ||
| if: | ||
| - true | ||
| run: | ||
| - action: add-comment@v1 | ||
| # Assign reviewers silently | ||
| - action: add-reviewers@v1 | ||
| args: | ||
| comment: "{{ calc.etr }} min review" | ||
| reviewers: {{ who.experts }} | ||
|
|
||
| # Request changes by PR authors when they fail to reference Jira tickets in the PR title or description. | ||
| request_missing_jira_info: | ||
| if: | ||
| - {{ not (has.jira_ticket_in_title or has.jira_ticket_in_desc) }} | ||
| run: | ||
| - action: request-changes@v1 | ||
| # ONE consolidated, updatable comment | ||
| - action: add-comment@v1 | ||
| args: | ||
| 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: | ||
| if: | ||
| - true | ||
| run: | ||
| - action: explain-code-experts@v1 | ||
| args: | ||
| gt: 10 | ||
| ## gitStream Summary — Low Noise (Staff Engineer focus) | ||
| **AI PR Description:** Updated in the PR body above. | ||
| **ETR:** {{ calc.etr }} min review | ||
| **Unresolved threads:** {{ pr.unresolved_threads | default(value=0) }} | ||
| **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).' }} | ||
| # +----------------------------------------------------------------------------+ | ||
| # | Custom Expressions | | ||
| # | https://docs.gitstream.cm/how-it-works/#custom-expressions | | ||
| # +----------------------------------------------------------------------------+ | ||
| ### Suggested Reviewers (auto-assigned) | ||
| {{ who.experts }} | ||
| # ----------------- config ----------------- | ||
| calc: | ||
| etr: {{ branch | estimatedReviewTime }} | ||
| safe_changes: {{ is.formatting or is.docs or is.tests or is.image }} | ||
|
|
||
| has: | ||
| jira_ticket_in_title: {{ pr.title | includes(regex=r/\b[A-Za-z]+-\d+\b/) }} | ||
| jira_ticket_in_desc: {{ pr.description | includes(regex=r/atlassian.net\/browse\/\w{1,}-\d{3,4}/) }} | ||
| jira_ticket_in_title: {{ pr.title | includes(regex=r/\b[A-Za-z][A-Za-z0-9_]+-\d+\b/) }} | ||
| jira_ticket_in_desc: {{ pr.description | includes(regex=r/\b[A-Za-z][A-Za-z0-9_]+-\d+\b/) }} | ||
|
|
||
| colors: | ||
| red: 'b60205' | ||
| yellow: 'fbca04' | ||
| green: '0e8a16' | ||
| who: | ||
| experts: {{ repo | codeExperts(gt=10, top=5) }} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't have the |
||
|
|
||
| is: | ||
| formatting: {{ source.diff.files | isFormattingChange }} | ||
| docs: {{ files | allDocs }} | ||
| tests: {{ files | allTests }} | ||
| image: {{ files | allImages }} | ||
| bot_author: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }} | ||
| bot_branch: {{ branch.name | match(list=['renovate/']) | some }} | ||
| bot: {{ pr.author | match(list=['github-actions','_bot_','[bot]','dependabot','gitstream-cm','prvalidation','aida-bot']) | some }} | ||
|
|
||
| colors: | ||
| red: 'b60205' | ||
| yellow: 'fbca04' | ||
| green: '0e8a16' | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an exact copypaste from https://docs.gitstream.cm/github-installation/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha. please apply latest fix #832