Skip to content

Commit 0cd0f70

Browse files
committed
more use cases
1 parent 84cf99a commit 0cd0f70

File tree

6 files changed

+55
-3
lines changed

6 files changed

+55
-3
lines changed

docs/downloads/automation-library/integrations/askAI/askAI_CR.cm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ triggers:
77
- pr_created
88

99
automations:
10-
ask_ai_describe:
10+
ask_ai_review:
1111
if:
1212
- {{ pr.labels | match(term="askai cr") | some }}
1313
run:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
manifest:
2+
version: 1.0
3+
4+
triggers:
5+
on:
6+
- commit
7+
- pr_created
8+
9+
automations:
10+
ask_ai_document:
11+
if:
12+
- {{ pr.labels | match(term="askai tests") | some }}
13+
run:
14+
- action: add-comment@v1
15+
args:
16+
comment: |
17+
# 🧪 Test Suggestions 🧪
18+
{{ source | askAI("Technical writer",
19+
"Review the code diff and generate documentation for any newly added features or significant changes.
20+
Focus on describing functionality, parameters, and expected behavior.
21+
Format the output in clear, concise bullet points or paragraphs.", env.OPEN_AI_TOKEN) | encode }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
manifest:
2+
version: 1.0
3+
4+
triggers:
5+
on:
6+
- commit
7+
- pr_created
8+
9+
automations:
10+
ask_ai_improve:
11+
if:
12+
- {{ pr.labels | match(term="askai tests") | some }}
13+
run:
14+
- action: add-comment@v1
15+
args:
16+
comment: |
17+
# 🧪 Test Suggestions 🧪
18+
{{ source | askAI("QA tester",
19+
"Review the code diff and suggest improvements to enhance readability, performance, and maintainability.
20+
Focus only on the modified code and provide specific, actionable recommendations.", env.OPEN_AI_TOKEN) | encode }}

docs/downloads/automation-library/integrations/askAI/askAI_summarize.cm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ triggers:
77
- pr_created
88

99
automations:
10-
ask_ai_describe:
10+
ask_ai_summarize:
1111
if:
1212
- {{ pr.labels | match(term="askai summarize") | some }}
1313
run:

docs/downloads/automation-library/integrations/askAI/askAI_tests.cm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ triggers:
77
- pr_created
88

99
automations:
10-
ask_ai_describe:
10+
ask_ai_tests:
1111
if:
1212
- {{ pr.labels | match(term="askai tests") | some }}
1313
run:

docs/integrations/askAI.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ category: [quality, genai, copilot, tests, efficiency]
2323

2424
--8<-- "docs/automations/integrations/askAI/code-review/README.md:example"
2525

26+
## Ask AI for Documentation
27+
28+
--8<-- "docs/automations/integrations/askAI/document/README.md:example"
29+
30+
## Ask AI for Code Improvements
31+
32+
--8<-- "docs/automations/integrations/askAI/improve/README.md:example"
33+
34+
<!-- ## Ask AI for anything
35+
36+
--8<-- "docs/automations/integrations/askAI/code-review/README.md:example" -->
2637
<!-- --8<-- [end:examples]-->
2738

2839
## Additional Resources

0 commit comments

Comments
 (0)