-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #586 from linear-b/refactor-askAI
AskAI improvements
- Loading branch information
Showing
13 changed files
with
203 additions
and
139 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: Integrate gitStream with AI | ||
description: Use gitStream to integrate with AI services for Review, describe and add tests. | ||
category: [quality, genai, copilot, tests, efficiency] | ||
--- | ||
# Integrate gitStream with AI | ||
|
||
<!-- --8<-- [start:examples]--> | ||
!!! warning "Required gitStream Plugins" | ||
This example requires you to install the [`askAI`](/filter-function-plugins/#askai) plugin. | ||
|
||
[Learn more about gitStream plugins](/plugins/). | ||
|
||
## Ask AI to Summarize the Changes in a PR | ||
|
||
--8<-- "docs/automations/integrations/askAI/summarize-pr/README.md:example" | ||
|
||
## Ask AI to Suggest Tests | ||
|
||
--8<-- "docs/automations/integrations/askAI/add-tests/README.md:example" | ||
|
||
## Ask AI for a Code Review | ||
|
||
--8<-- "docs/automations/integrations/askAI/code-review/README.md:example" | ||
|
||
<!-- --8<-- [end:examples]--> | ||
|
||
## Additional Resources | ||
|
||
--8<-- "docs/snippets/general.md" | ||
|
||
--8<-- "docs/snippets/automation-footer.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: Automation - Ask AI to Suggest Tests | ||
description: Use gitStream's integration with AI services to suggests additional tests | ||
category: [quality, genai, copilot, tests, efficiency] | ||
--- | ||
# Ask AI to Suggest Tests | ||
|
||
<!-- --8<-- [start:example]--> | ||
Use AI to suggests additional test cases for uncovered or modified functions in the PR, including edge cases. | ||
|
||
!!! info "Configuration Description" | ||
|
||
Conditions (all must be true): | ||
|
||
* A PR is created or new code has been committed to the PR. | ||
* The PR has a label "askai tests" | ||
|
||
Automation Actions: | ||
|
||
* Add a comment with suggested tests generated by an AI model | ||
|
||
!!! example "Configuration Example" | ||
```yaml+jinja | ||
--8<-- "docs/downloads/automation-library/integrations/askAI/askAI_tests.cm" | ||
``` | ||
<div class="result" markdown> | ||
<span> | ||
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/askAI/askAI-QA.cm){ .md-button } | ||
</span> | ||
</div> | ||
<!-- --8<-- [end:example]--> | ||
|
||
## Additional Resources | ||
|
||
--8<-- "docs/snippets/general.md" | ||
|
||
**Related Automations**: | ||
|
||
--8<-- "docs/snippets/context-automation.md" | ||
|
||
--8<-- "docs/snippets/automation-footer.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: Automation - Ask AI for a Code Review | ||
description: Use gitStream's integration with AI services to perform a comprehensive code review to your code | ||
category: [quickstart, quality, genai, copilot, tests, efficiency] | ||
--- | ||
# Ask AI for a Code Review | ||
|
||
<!-- --8<-- [start:example]--> | ||
Use AI to perform a comprehensive code review, identify bugs, security risks, performance issues, deprecated methods, and style guide violations, and suggests improvements. | ||
|
||
!!! info "Configuration Description" | ||
|
||
Conditions (all must be true): | ||
|
||
* A PR is created or new code has been committed to the PR. | ||
* The PR has a label "askai cr" | ||
|
||
Automation Actions: | ||
|
||
* Add a comment with a code review generated by an AI model | ||
|
||
!!! example "Configuration Example" | ||
```yaml+jinja | ||
--8<-- "docs/downloads/automation-library/integrations/askAI/askAI_CR.cm" | ||
``` | ||
<div class="result" markdown> | ||
<span> | ||
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/askAI/askAI-CR.cm){ .md-button } | ||
</span> | ||
</div> | ||
<!-- --8<-- [end:example]--> | ||
|
||
## Additional Resources | ||
|
||
--8<-- "docs/snippets/general.md" | ||
|
||
**Related Automations**: | ||
|
||
--8<-- "docs/snippets/context-automation.md" | ||
|
||
--8<-- "docs/snippets/automation-footer.md" |
43 changes: 43 additions & 0 deletions
43
docs/automations/integrations/askAI/summarize-pr/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: Automation - Ask AI to Summarize the Changes in a PR | ||
description: Use gitStream's integration with AI services to generate a summary of the changes in the PR. | ||
category: [quality, genai, copilot, tests, efficiency] | ||
--- | ||
# Ask AI to Summarize the Changes in a PR | ||
|
||
<!-- --8<-- [start:example]--> | ||
Use AI to generate a concise bullet-point summary of the changes in the pull request. | ||
|
||
![summarized-pr](/automations/integrations/askAI/summarize-pr/summarized-pr.png) | ||
|
||
!!! info "Configuration Description" | ||
|
||
Conditions (all must be true): | ||
|
||
* A PR is created or new code has been committed to the PR. | ||
* The PR has a label "askai summarize" | ||
|
||
Automation Actions: | ||
|
||
* Add a comment with a summary of the PR | ||
|
||
!!! example "Configuration Example" | ||
```yaml+jinja | ||
--8<-- "docs/downloads/automation-library/integrations/askAI/askAI_summarize.cm" | ||
``` | ||
<div class="result" markdown> | ||
<span> | ||
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/askAI/askAI-QA.cm){ .md-button } | ||
</span> | ||
</div> | ||
<!-- --8<-- [end:example]--> | ||
|
||
## Additional Resources | ||
|
||
--8<-- "docs/snippets/general.md" | ||
|
||
**Related Automations**: | ||
|
||
--8<-- "docs/snippets/context-automation.md" | ||
|
||
--8<-- "docs/snippets/automation-footer.md" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
docs/downloads/automation-library/integrations/askAI/askAI_QA.cm
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
docs/downloads/automation-library/integrations/askAI/askAI_describe.cm
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
docs/downloads/automation-library/integrations/askAI/askAI_summarize.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
manifest: | ||
version: 1.0 | ||
|
||
triggers: | ||
on: | ||
- commit | ||
- pr_created | ||
|
||
automations: | ||
ask_ai_describe: | ||
if: | ||
- {{ pr.labels | match(term="askai summarize") | some }} | ||
run: | ||
- action: add-comment@v1 | ||
args: | ||
comment: | | ||
# 📜 PR Summary 📜 | ||
{{ source | askAI(" | ||
Summarize the changes in this PR in bullet points.", env.OPEN_AI_TOKEN) | encode }} |
21 changes: 21 additions & 0 deletions
21
docs/downloads/automation-library/integrations/askAI/askAI_tests.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
manifest: | ||
version: 1.0 | ||
|
||
triggers: | ||
on: | ||
- commit | ||
- pr_created | ||
|
||
automations: | ||
ask_ai_describe: | ||
if: | ||
- {{ pr.labels | match(term="askai tests") | some }} | ||
run: | ||
- action: add-comment@v1 | ||
args: | ||
comment: | | ||
# 🧪 Test Suggestions 🧪 | ||
{{ source | askAI(" | ||
Identify any new or modified functions without test coverage in this PR. | ||
Suggest specific test cases to add, including edge cases. | ||
If all functions are covered, return 'No additional tests needed.'", env.OPEN_AI_TOKEN) | encode }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters