Skip to content

Commit

Permalink
Merge pull request #575 from linear-b/askAI-describe-PR
Browse files Browse the repository at this point in the history
added rule to describe pr
  • Loading branch information
PavelLinearB authored Sep 1, 2024
2 parents 84a3760 + c2aafe4 commit 2201cf3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
17 changes: 17 additions & 0 deletions .cm/ask-ai.cm
Original file line number Diff line number Diff line change
@@ -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 }}"
26 changes: 13 additions & 13 deletions docs/filter-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ The following functions are supported in addition to the built-in functions prov

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

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

</div>

Expand Down

0 comments on commit 2201cf3

Please sign in to comment.