Skip to content

Commit ebd7d50

Browse files
Merge branch 'main' into branch-reviewers-docs
2 parents 060e7fc + d255571 commit ebd7d50

File tree

18 files changed

+301
-213
lines changed

18 files changed

+301
-213
lines changed

.cm/ask-ai.cm

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ triggers:
77
on:
88
- pr_created
99
- commit
10+
1011
automations:
1112
describe_pr:
1213
if:
@@ -15,5 +16,26 @@ automations:
1516
- action: add-comment@v1
1617
args:
1718
comment: |
18-
# ✨gitStream Describe PR ✨
19-
{{ source | askAI("based on the given context, describe in plain english the changes introduced in this PR.", env.OPEN_AI_TOKEN) | encode }}
19+
# 📜 PR Summary 📜
20+
{{ source | askAI("
21+
Summarize in simple terms the changes in this PR using bullet points.", env.OPEN_AI_TOKEN) | encode }}
22+
23+
cr_code_changes:
24+
if:
25+
- {{ has.code_changes }}
26+
run:
27+
- action: add-comment@v1
28+
args:
29+
comment: |
30+
# ✨ gitStream Review ✨
31+
{{ source | askAI("
32+
Review the PR code diff only for `js` and `cm` (gitStream Configuration) files. You can suggest code changes. Make sure you cover
33+
- Finding bugs, security risks, and performance issues
34+
- Verify best practices and style guide violations
35+
- Specific improvement suggestions based on the changes",
36+
env.OPEN_AI_TOKEN) | encode }}
37+
38+
39+
40+
has:
41+
code_changes: {{ files | extensions | match(list=['cm', 'js']) | some }}

docs/automations/integrations/AI/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/automations/integrations/AI/askAI/README.md

Lines changed: 0 additions & 88 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Integrate gitStream with AI
3+
description: Use gitStream to integrate with AI services for Review, describe and add tests.
4+
category: [quality, genai, copilot, tests, efficiency]
5+
---
6+
# Integrate gitStream with AI
7+
8+
<!-- --8<-- [start:examples]-->
9+
!!! warning "Required gitStream Plugins"
10+
This example requires you to install the [`askAI`](/filter-function-plugins/#askai) plugin.
11+
12+
[Learn more about gitStream plugins](/plugins/).
13+
14+
## Ask AI to Summarize the Changes in a PR
15+
16+
--8<-- "docs/automations/integrations/askAI/summarize-pr/README.md:example"
17+
18+
## Ask AI to Suggest Tests
19+
20+
--8<-- "docs/automations/integrations/askAI/add-tests/README.md:example"
21+
22+
## Ask AI for a Code Review
23+
24+
--8<-- "docs/automations/integrations/askAI/code-review/README.md:example"
25+
26+
<!-- --8<-- [end:examples]-->
27+
28+
## Additional Resources
29+
30+
--8<-- "docs/snippets/general.md"
31+
32+
--8<-- "docs/snippets/automation-footer.md"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Automation - Ask AI to Suggest Tests
3+
description: Use gitStream's integration with AI services to suggests additional tests
4+
category: [quality, genai, copilot, tests, efficiency]
5+
---
6+
# Ask AI to Suggest Tests
7+
8+
<!-- --8<-- [start:example]-->
9+
Use AI to suggests additional test cases for uncovered or modified functions in the PR, including edge cases.
10+
11+
!!! info "Configuration Description"
12+
13+
Conditions (all must be true):
14+
15+
* A PR is created or new code has been committed to the PR.
16+
* The PR has a label "askai tests"
17+
18+
Automation Actions:
19+
20+
* Add a comment with suggested tests generated by an AI model
21+
22+
!!! example "Configuration Example"
23+
```yaml+jinja
24+
--8<-- "docs/downloads/automation-library/integrations/askAI/askAI_tests.cm"
25+
```
26+
<div class="result" markdown>
27+
<span>
28+
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/askAI/askAI-QA.cm){ .md-button }
29+
</span>
30+
</div>
31+
<!-- --8<-- [end:example]-->
32+
33+
## Additional Resources
34+
35+
--8<-- "docs/snippets/general.md"
36+
37+
**Related Automations**:
38+
39+
--8<-- "docs/snippets/context-automation.md"
40+
41+
--8<-- "docs/snippets/automation-footer.md"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Automation - Ask AI for a Code Review
3+
description: Use gitStream's integration with AI services to perform a comprehensive code review to your code
4+
category: [quickstart, quality, genai, copilot, tests, efficiency]
5+
---
6+
# Ask AI for a Code Review
7+
8+
<!-- --8<-- [start:example]-->
9+
Use AI to perform a comprehensive code review, identify bugs, security risks, performance issues, deprecated methods, and style guide violations, and suggests improvements.
10+
11+
!!! info "Configuration Description"
12+
13+
Conditions (all must be true):
14+
15+
* A PR is created or new code has been committed to the PR.
16+
* The PR has a label "askai cr"
17+
18+
Automation Actions:
19+
20+
* Add a comment with a code review generated by an AI model
21+
22+
!!! example "Configuration Example"
23+
```yaml+jinja
24+
--8<-- "docs/downloads/automation-library/integrations/askAI/askAI_CR.cm"
25+
```
26+
<div class="result" markdown>
27+
<span>
28+
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/askAI/askAI-CR.cm){ .md-button }
29+
</span>
30+
</div>
31+
<!-- --8<-- [end:example]-->
32+
33+
## Additional Resources
34+
35+
--8<-- "docs/snippets/general.md"
36+
37+
**Related Automations**:
38+
39+
--8<-- "docs/snippets/context-automation.md"
40+
41+
--8<-- "docs/snippets/automation-footer.md"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Automation - Ask AI to Summarize the Changes in a PR
3+
description: Use gitStream's integration with AI services to generate a summary of the changes in the PR.
4+
category: [quality, genai, copilot, tests, efficiency]
5+
---
6+
# Ask AI to Summarize the Changes in a PR
7+
8+
<!-- --8<-- [start:example]-->
9+
Use AI to generate a concise bullet-point summary of the changes in the pull request.
10+
11+
![summarized-pr](/automations/integrations/askAI/summarize-pr/summarized-pr.png)
12+
13+
!!! info "Configuration Description"
14+
15+
Conditions (all must be true):
16+
17+
* A PR is created or new code has been committed to the PR.
18+
* The PR has a label "askai summarize"
19+
20+
Automation Actions:
21+
22+
* Add a comment with a summary of the PR
23+
24+
!!! example "Configuration Example"
25+
```yaml+jinja
26+
--8<-- "docs/downloads/automation-library/integrations/askAI/askAI_summarize.cm"
27+
```
28+
<div class="result" markdown>
29+
<span>
30+
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/askAI/askAI-QA.cm){ .md-button }
31+
</span>
32+
</div>
33+
<!-- --8<-- [end:example]-->
34+
35+
## Additional Resources
36+
37+
--8<-- "docs/snippets/general.md"
38+
39+
**Related Automations**:
40+
41+
--8<-- "docs/snippets/context-automation.md"
42+
43+
--8<-- "docs/snippets/automation-footer.md"
193 KB
Loading

0 commit comments

Comments
 (0)