Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe PR template #648

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions docs/filter-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

<div class="filter-details" markdown=1>

Expand All @@ -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:
Expand All @@ -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`
Expand Down Expand Up @@ -1021,4 +1028,4 @@ Configuration file example:
]
}
}
```
```