From c2aafe4fd69057e3f5fba17045fd8595d9b91587 Mon Sep 17 00:00:00 2001 From: PavelLinearB Date: Sun, 1 Sep 2024 12:16:33 +0300 Subject: [PATCH] added rule to describe pr --- .cm/ask-ai.cm | 17 +++++++++++++++++ docs/filter-functions.md | 26 +++++++++++++------------- 2 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 .cm/ask-ai.cm diff --git a/.cm/ask-ai.cm b/.cm/ask-ai.cm new file mode 100644 index 00000000..aaeae877 --- /dev/null +++ b/.cm/ask-ai.cm @@ -0,0 +1,17 @@ +-*- mode: yaml -*- + +manifest: + version: 1.0 + +triggers: + on: + - pr_created + - commit +automations: + describe_pr: + if: + - true + run: + - action: add-comment@v1 + args: + comment: "{{ source | askAI("based on the given context, describe in plain english the changes introduced in this PR.", env.OPEN_AI_TOKEN) | prependTitle("gitStream Describe PR") | encode }}" \ No newline at end of file diff --git a/docs/filter-functions.md b/docs/filter-functions.md index 050fe9d0..65670449 100644 --- a/docs/filter-functions.md +++ b/docs/filter-functions.md @@ -18,19 +18,19 @@ The following functions are supported in addition to the built-in functions prov
-| Function | Input | Args | Output | -| --------------- | ------- | ---- | ---- | -| [`capture`](#capture)
Find and return the first occurrence of a regex in the input string | String | `regex` | [Objects] | -| [`difference`](#difference)
Given two lists, keep only items that are in the 1st list but not in the 2nd. | [Objects] | `list` | [Objects] | -| [`every`](#every)
Checks whether all element in the list are `true` | [Bool] | - | Bool | -| [`filter`](#filter)
Reduce list of items into a list of same items that match the specified term | [String]
[Object] | `regex`, `term`, `list`, `attr` | [String]
[Object] | -| [`includes`](#match)
Check if substring match | String | `regex`, `term`, `list` | Bool | -| [`intersection`](#intersection)
Given two lists, keep only items that are in both lists.| [Objects] | `list` | [Objects] | -| [`map`](#map)
Maps each object in a list into their specified attribute value | [Object] | `attr` | [Object] | -| [`match`](#match)
Maps list of items into a list of booleans that match the specified term | [String]
[Object] | `regex`, `term`, `list` `attr` | [Bool] | -| [`nope`](#nope)
Checks whether all element in the list are `false` | [Bool] | - | Bool | -| [`reject`](#reject)
Inverse of [`filter`](#filter), the result list contains non-matching items | [String]
[Object] | `regex`, `term`, `list`, `attr` | [String]
[Object] | -| [`some`](#some)
Checks whether at least one element in the list is `true` | [Bool] | - | Bool | +| Function | Input | Args | Output | +| -------------------------------------------------------------------------------------------------------------- | ---------------------- | ------------------------------- | ---------------------- | +| [`capture`](#capture)
Find and return the first occurrence of a regex in the input string | String | `regex` | [Objects] | +| [`difference`](#difference)
Given two lists, keep only items that are in the 1st list but not in the 2nd. | [Objects] | `list` | [Objects] | +| [`every`](#every)
Checks whether all element in the list are `true` | [Bool] | - | Bool | +| [`filter`](#filter)
Reduce list of items into a list of same items that match the specified term | [String]
[Object] | `regex`, `term`, `list`, `attr` | [String]
[Object] | +| [`includes`](#match)
Check if substring match | String | `regex`, `term`, `list` | Bool | +| [`intersection`](#intersection)
Given two lists, keep only items that are in both lists. | [Objects] | `list` | [Objects] | +| [`map`](#map)
Maps each object in a list into their specified attribute value | [Object] | `attr` | [Object] | +| [`match`](#match)
Maps list of items into a list of booleans that match the specified term | [String]
[Object] | `regex`, `term`, `list` `attr` | [Bool] | +| [`nope`](#nope)
Checks whether all element in the list are `false` | [Bool] | - | Bool | +| [`reject`](#reject)
Inverse of [`filter`](#filter), the result list contains non-matching items | [String]
[Object] | `regex`, `term`, `list`, `attr` | [String]
[Object] | +| [`some`](#some)
Checks whether at least one element in the list is `true` | [Bool] | - | Bool |