From f981fa90a117a42d62ef4de7cd2ba809bbeff690 Mon Sep 17 00:00:00 2001 From: Pavel Vaks <129676672+PavelLinearB@users.noreply.github.com> Date: Sun, 8 Sep 2024 10:45:59 +0300 Subject: [PATCH] Update ask-ai.cm --- .cm/ask-ai.cm | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.cm/ask-ai.cm b/.cm/ask-ai.cm index dadbabb9..e50ebcfb 100644 --- a/.cm/ask-ai.cm +++ b/.cm/ask-ai.cm @@ -7,6 +7,7 @@ triggers: on: - pr_created - commit + automations: describe_pr: if: @@ -15,5 +16,25 @@ automations: - action: add-comment@v1 args: comment: | - # ✨gitStream Describe PR ✨ - {{ source | askAI("based on the given context, describe in plain english the changes introduced in this PR.", env.OPEN_AI_TOKEN) | encode }} + # 📜 PR Summary 📜 + {{ source | askAI(" + Summarize in simple terms the changes in this PR using bullet points.", env.OPEN_AI_TOKEN) | encode }} + + cr_code_changes: + if: + - {{ has.code_changes }} + run: + - action: add-comment@v1 + args: + comment: | + # ✨ gitStream Review ✨ + {{ source | askAI(" + Review the PR code diff only for `js` and `cm` (gitStream Configuration) files. + - Identify bugs, security risks, and performance issues. + - Verify best practices and style guide violations. + - Suggest improvements.", env.OPEN_AI_TOKEN) | encode }} + + + +has: + code_changes: {{ files | extensions | match(list=['cm', 'js']) | some }}