Skip to content

Commit 2201cf3

Browse files
authored
Merge pull request #575 from linear-b/askAI-describe-PR
added rule to describe pr
2 parents 84a3760 + c2aafe4 commit 2201cf3

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

.cm/ask-ai.cm

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
-*- mode: yaml -*-
2+
3+
manifest:
4+
version: 1.0
5+
6+
triggers:
7+
on:
8+
- pr_created
9+
- commit
10+
automations:
11+
describe_pr:
12+
if:
13+
- true
14+
run:
15+
- action: add-comment@v1
16+
args:
17+
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 }}"

docs/filter-functions.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ The following functions are supported in addition to the built-in functions prov
1818

1919
<div class="big-summary" markdown=1>
2020

21-
| Function | Input | Args | Output |
22-
| --------------- | ------- | ---- | ---- |
23-
| [`capture`](#capture)<br />Find and return the first occurrence of a regex in the input string | String | `regex` | [Objects] |
24-
| [`difference`](#difference)<br />Given two lists, keep only items that are in the 1st list but not in the 2nd. | [Objects] | `list` | [Objects] |
25-
| [`every`](#every)<br />Checks whether all element in the list are `true` | [Bool] | - | Bool |
26-
| [`filter`](#filter)<br />Reduce list of items into a list of same items that match the specified term | [String]<br />[Object] | `regex`, `term`, `list`, `attr` | [String]<br />[Object] |
27-
| [`includes`](#match)<br />Check if substring match | String | `regex`, `term`, `list` | Bool |
28-
| [`intersection`](#intersection)<br />Given two lists, keep only items that are in both lists.| [Objects] | `list` | [Objects] |
29-
| [`map`](#map)<br />Maps each object in a list into their specified attribute value | [Object] | `attr` | [Object] |
30-
| [`match`](#match)<br />Maps list of items into a list of booleans that match the specified term | [String]<br />[Object] | `regex`, `term`, `list` `attr` | [Bool] |
31-
| [`nope`](#nope)<br />Checks whether all element in the list are `false` | [Bool] | - | Bool |
32-
| [`reject`](#reject)<br />Inverse of [`filter`](#filter), the result list contains non-matching items | [String]<br />[Object] | `regex`, `term`, `list`, `attr` | [String]<br />[Object] |
33-
| [`some`](#some)<br />Checks whether at least one element in the list is `true` | [Bool] | - | Bool |
21+
| Function | Input | Args | Output |
22+
| -------------------------------------------------------------------------------------------------------------- | ---------------------- | ------------------------------- | ---------------------- |
23+
| [`capture`](#capture)<br />Find and return the first occurrence of a regex in the input string | String | `regex` | [Objects] |
24+
| [`difference`](#difference)<br />Given two lists, keep only items that are in the 1st list but not in the 2nd. | [Objects] | `list` | [Objects] |
25+
| [`every`](#every)<br />Checks whether all element in the list are `true` | [Bool] | - | Bool |
26+
| [`filter`](#filter)<br />Reduce list of items into a list of same items that match the specified term | [String]<br />[Object] | `regex`, `term`, `list`, `attr` | [String]<br />[Object] |
27+
| [`includes`](#match)<br />Check if substring match | String | `regex`, `term`, `list` | Bool |
28+
| [`intersection`](#intersection)<br />Given two lists, keep only items that are in both lists. | [Objects] | `list` | [Objects] |
29+
| [`map`](#map)<br />Maps each object in a list into their specified attribute value | [Object] | `attr` | [Object] |
30+
| [`match`](#match)<br />Maps list of items into a list of booleans that match the specified term | [String]<br />[Object] | `regex`, `term`, `list` `attr` | [Bool] |
31+
| [`nope`](#nope)<br />Checks whether all element in the list are `false` | [Bool] | - | Bool |
32+
| [`reject`](#reject)<br />Inverse of [`filter`](#filter), the result list contains non-matching items | [String]<br />[Object] | `regex`, `term`, `list`, `attr` | [String]<br />[Object] |
33+
| [`some`](#some)<br />Checks whether at least one element in the list is `true` | [Bool] | - | Bool |
3434

3535
</div>
3636

0 commit comments

Comments
 (0)