Skip to content

Commit 62bb1b1

Browse files
authored
Merge pull request #585 from linear-b/added-cr-rule
Update ask-ai.cm
2 parents 54c80ca + f981fa9 commit 62bb1b1

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.cm/ask-ai.cm

Lines changed: 23 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,25 @@ 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.
33+
- Identify bugs, security risks, and performance issues.
34+
- Verify best practices and style guide violations.
35+
- Suggest improvements.", env.OPEN_AI_TOKEN) | encode }}
36+
37+
38+
39+
has:
40+
code_changes: {{ files | extensions | match(list=['cm', 'js']) | some }}

0 commit comments

Comments
 (0)