From 54363ecaa6737665b4a314178be3a22bd81fc4a4 Mon Sep 17 00:00:00 2001 From: Pavel Vaks <129676672+PavelLinearB@users.noreply.github.com> Date: Wed, 29 Jan 2025 12:10:05 +0200 Subject: [PATCH] Update filter-functions.md --- docs/filter-functions.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/filter-functions.md b/docs/filter-functions.md index 13518c6e..58f1a465 100644 --- a/docs/filter-functions.md +++ b/docs/filter-functions.md @@ -301,7 +301,7 @@ Check if all changes except for `config.json` files are formatting: #### `some` -Checks whether any element in the list is `true`. In case the list of elements is empty it will return `false`. +Check whether any element in the list is `true`. If the list of elements is empty, it will return `false`.
@@ -325,9 +325,13 @@ Checks whether any element in the list is `true`. In case the list of elements Leverage LinearB's AI to assist with generating a concise and meaningful description for pull requests based on the provided context. Streamline the review process by summarizing the purpose and key changes in a PR, reducing the manual effort and cognitive load for developers and reviewers. +Use the optional `template` argument to customize the AI-generated PR description format to fit your needs. If no template is provided, gitStream will use its default summarization logic. + + | **Argument** | Usage | **Type** | **Description** | | ------------ | ------ | -------- | ---------------------------------------------------------------------- | | - | Input | `Object` | The context to send to the AI for generating a description. | +| `template` | Input (optional) | `String` | A custom format to guide the AI-generated description output. If not provided, a default bullet point summarization format will be used | | - | Output | String | AI-generated description of the PR based on the provided input context | Use the `AI_DescribePR` filter in a `.cm` file to append the AI-generated description to the PR description on each non-bot commit: @@ -344,8 +348,11 @@ automations: - action: update-description@v1 args: concat_mode: append - description: {{ source | AI_DescribePR }} - + description: {{ source | AI_DescribePR(template=SUMMARY_TEMPLATE) }} + +SUMMARY_TEMPLATE: | + "Summary: {changes}. + Impact: {impact}." ``` #### `allDocs` @@ -1021,4 +1028,4 @@ Configuration file example: ] } } -``` \ No newline at end of file +```