Skip to content
Merged
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
23 changes: 21 additions & 2 deletions mintlify/gitops/sql-review-ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,41 @@
title: SQL Review CI
---

Once you've set up the [GitOps Workflow](/gitops/overview/), your SQL Review Policy will automatically be applied to all pull/merge requests. The results of the SQL review will appear as a comment.
SQL Review CI validates your SQL changes against configured policies during pull/merge requests. The review bot posts feedback directly as PR comments.

## Setup

Before enabling SQL Review CI:

1. [Set up SQL Review Policy](/sql-review/review-policy) - Define your SQL standards and rules
2. [Install GitOps Integration](/gitops/installation) - Connect Bytebase to your VCS

## Examples

We provide examples for GitHub, GitLab, Bitbucket, and Azure DevOps below. Adjust the parameters to match your repository structure and workflow.

## GitHub

<Card title="Tutorial: SQL Review with GitHub Actions" icon="graduation-cap" href="/tutorials/gitops-github-workflow#step-3-configure-sql-review-in-bytebase" horizontal />

<Card title="Example: GitHub Actions Workflow" icon="code" href="https://github.com/bytebase/example-gitops-github-flow/blob/main/.github/workflows/sql-review-action.yml" horizontal />

![github](/content/docs/gitops/sql-review-ci/github-pr-sql-review.webp)

## GitLab

<Card title="Example: GitLab CI Configuration" icon="code" href="https://gitlab.com/bytebase-sample/gitops-example/-/blob/main/bytebase-review.yml" horizontal />

![gitlab](/content/docs/gitops/sql-review-ci/gitlab-pr-sql-review.webp)

## Bitbucket

<Card title="Example: Bitbucket Pipelines" icon="code" href="https://bitbucket.org/p0nyyy/cicd/src/main/bitbucket-pipelines.yml" horizontal />

![bitbucket](/content/docs/gitops/sql-review-ci/bb-pr-sql-review.webp)

## Azure DevOps

![azure devops](/content/docs/gitops/sql-review-ci/azure-devops-pr-sql-review.webp)
<Card title="Example: Azure Pipelines" icon="code" href="https://dev.azure.com/bytebase-hq/_git/bytebase-example?path=/pipelines/sql-review.yml" horizontal />

![azure devops](/content/docs/gitops/sql-review-ci/azure-devops-pr-sql-review.webp)