Code Review Using LinearB's AI
Use LinearB's AI with the code-review
action to automatically review the introduced changes to the code.
Configuration Description
Conditions (all must be true):
- A PR is created or new code has been committed to the PR.
- The PR is not on Draft staten and was not created by a bot.
Automation Actions:
- Perform an AI-driven code review and append the review comments to the PR.
Configuration Example
manifest:
version: 1.0
automations:
linearb_ai_review:
on:
- pr_created
- commit
if:
- {{ not pr.draft }}
- {{ pr.author | match(list=['github-actions', 'dependabot', '[bot]']) | nope }}
run:
- action: code-review@v1
args:
approve_on_LGTM: {{ APPROVE_PR_ON_LGTM }} # optional arg, you can remove it
APPROVE_PR_ON_LGTM: false # you can add conditions for PR approvals. For example - allowing approvals only for specific users
Additional Resources
gitStream is a workflow automation tool that enables you to use YAML configuration files to optimize your code review process. Add context to PRs, find code experts for reviews, and automate the merge process to maximize developer productivity.
Learn More about how gitStream Works.
Related Automations:
- Estimate the amount of time it would require someone to complete a PR review.
- Flag missing Jira ticket information
- Label PRs that delete files.
- Label PRs that lack tests
- Provide information about what percent of a PR is new code.
- Request PR authors to provide screenshots in relevant PRs.
More Automations can be found on the Automation Library and Integrations pages.