Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 7 additions & 5 deletions docs/automation-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,16 @@ automations:
args:
approve_on_LGTM: {{ APPROVE_PR_ON_LGTM }} # optional arg, you can remove it
guidelines: {{ GUIDELINES | dump }}
...
...
# Define variables

APPROVE_PR_ON_LGTM: false # Add conditions for PR approvals. For example - allow approval only for specific users
# Define variables
# Add conditions for PR approvals. For example - allow approval only for specific users
APPROVE_PR_ON_LGTM: false
# Add your prompts to the review
GUIDELINES: |
- Don't comment on using outdated dependencies

- In Javascript
- Make sure camelCase is used for variable names
- Make sure PascalCase is used for class names
```

The following files are automatically excluded from the code review.
Expand Down
14 changes: 14 additions & 0 deletions docs/automations/integrations/LinearBAI/code-review/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Use LinearB's AI with the [`code-review`](/automation-actions/#code-review) acti
Automation Actions:

* Perform an AI-driven code review and append the review comments to the PR.
* Use `guidelines` to add your prompts to the team or org review

=== "For GitHub"

Expand Down Expand Up @@ -58,8 +59,21 @@ Use LinearB's AI with the [`code-review`](/automation-actions/#code-review) acti
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/LinearBAI/code-review-bb.cm){ .md-button }
</span>
</div>

!!! tip "`./REVIEW_RULES.md` example"

This file should be created in your repo root:

```
1. Do not comment on missing documentation.
2. Do not comment on missing tests.
3. For JavaScript code, enforce using camelCase for variables and functions.
```

<!-- --8<-- [end:example]-->



## Additional Resources

--8<-- "docs/snippets/general.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,14 @@ automations:
- action: code-review@v1
args:
approve_on_LGTM: {{ APPROVE_PR_ON_LGTM }} # optional arg, you can remove it
guidelines: {{ GUIDELINES }}

APPROVE_PR_ON_LGTM: false # you can add conditions for PR approvals. For example - allowing approvals only for specific users
# Define variables
# Add conditions for PR approvals. For example - allow approval only for specific users
APPROVE_PR_ON_LGTM: false

# Add `guidelines` to add your prompts to the review, you can have org wide instructions
# by placing the `REVIEW_RULES.md` in the `cm` repo or team level instructions by adding it to
# the team repo.
# Note: To when the file is in the `cm` repo, use this example: `../cm/REVIEW_RULES.md`
GUIDELINES: {{ "./REVIEW_RULES.md" | readFile() | dump }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,14 @@ automations:
- action: code-review@v1
args:
approve_on_LGTM: {{ APPROVE_PR_ON_LGTM }} # optional arg, you can remove it
guidelines: {{ GUIDELINES }}

APPROVE_PR_ON_LGTM: false # you can add conditions for PR approvals. For example - allowing approvals only for specific users
# Define variables
# Add conditions for PR approvals. For example - allow approval only for specific users
APPROVE_PR_ON_LGTM: false

# Add `guidelines` to add your prompts to the review, you can have org wide instructions
# by placing the `REVIEW_RULES.md` in the `cm` repo or team level instructions by adding it to
# the team repo.
# Note: To when the file is in the `cm` repo, use this example: `../cm/REVIEW_RULES.md`
GUIDELINES: {{ "./REVIEW_RULES.md" | readFile() | dump }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,14 @@ automations:
- action: code-review@v1
args:
approve_on_LGTM: {{ APPROVE_PR_ON_LGTM }} # optional arg, you can remove it
guidelines: {{ GUIDELINES }}

APPROVE_PR_ON_LGTM: false # you can add conditions for PR approvals. For example - allowing approvals only for specific users
# Define variables
# Add conditions for PR approvals. For example - allow approval only for specific users
APPROVE_PR_ON_LGTM: false

# Add `guidelines` to add your prompts to the review, you can have org wide instructions
# by placing the `REVIEW_RULES.md` in the `cm` repo or team level instructions by adding it to
# the team repo.
# Note: To when the file is in the `cm` repo, use this example: `../cm/REVIEW_RULES.md`
GUIDELINES: {{ "./REVIEW_RULES.md" | readFile() | dump }}
8 changes: 4 additions & 4 deletions docs/integrations/LB_AI.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ category: [quality, genai, copilot, tests, efficiency]

## Automation Examples

### Add PR Description Using LinearB's AI :material-star-circle:

--8<-- "docs/automations/integrations/LinearBAI/describe-pr/README.md:example"

### Use LinearB's AI for a comprehensive Code Review :material-star-circle:

--8<-- "docs/automations/integrations/LinearBAI/code-review/README.md:example"

### Add PR Description Using LinearB's AI :material-star-circle:

--8<-- "docs/automations/integrations/LinearBAI/describe-pr/README.md:example"

## Additional Resources

--8<-- "docs/snippets/general.md"
Expand Down