> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pawsql.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> PawSQL 是一个产品：Cloud 是公网部署形态，Engine / Optimizer / Auditor / Advisor / Patroller 是同一产品的组件与交付形态，不是彼此独立的产品。 / PawSQL is a single product: Cloud is the public deployment form, while Engine / Optimizer / Auditor / Advisor / Patroller are components and delivery forms of the same product, not separate products.
> 术语以站内术语表为准：SQL 审核对应英文 SQL Review，查询重写对应 Query Rewrite，索引推荐对应 Index Recommendation；英文内容统一用 Review，不用 Audit。 / Use the site glossary for terminology: 审核 is SQL Review, 重写 is Query Rewrite, 索引推荐 is Index Recommendation; English content uses Review, never Audit.
> 引用能力范围或版本支持时以对应页面为准；标注 unknown、或 status 非 published 的内容表示尚未经产品核实，不应作为事实引用。 / Cite capability scope and version support from the corresponding page; content marked unknown, or with a status other than published, is not yet product-verified and must not be cited as fact.

# Repository Connectors

> Use prebuilt PawSQL connectors for Tencent CODING, GitHub, and GitLab to review SQL on commits and code reviews.

PawSQL provides prebuilt repository connectors for Tencent CODING, GitHub, and GitLab. A connector receives repository events, identifies relevant SQL changes, creates a PawSQL review, and links the result to the corresponding revision or code review.

## Goal

Use prebuilt PawSQL connectors for Tencent CODING, GitHub, and GitLab to review SQL on commits and code reviews.

## Prerequisites

Prepare a PawSQL workspace, review policy, and a least-privilege identity before configuring a connector.

## Available connectors

<CardGroup cols={3}>
  <Card title="Tencent CODING" href="/en/user-guide/cicd/coding" icon="code-branch">Connect a CODING project and repository.</Card>
  <Card title="GitHub" href="/en/user-guide/cicd/github" icon="github">Review SQL on pushes and pull requests.</Card>
  <Card title="GitLab" href="/en/user-guide/cicd/gitlab" icon="gitlab">Review SQL on pushes and merge requests.</Card>
</CardGroup>

## Connector responsibilities

* Maintain the connection between the source platform and PawSQL.
* Map organizations, repositories, branches, workspaces, and policies.
* Listen for supported repository events.
* Select SQL changes that match path and file rules.
* Create and correlate PawSQL review jobs.
* Return gate status and a secure report link.

## Repository connector versus pipeline connector

Repository connectors center on push, pull-request, and merge-request events. The BlueKing connector runs as a pipeline step. To control review from Jenkins, GitHub Actions, or another pipeline without a prebuilt connector, use the [OpenAPI pipeline pattern](/en/user-guide/cicd/openapi-pipeline).

## Common setup sequence

<Steps>
  <Step title="Prepare PawSQL context">Create the workspace and review policy and issue a least-privilege identity.</Step>
  <Step title="Create the repository connection">Choose the platform and complete authentication or authorization.</Step>
  <Step title="Select repositories and events">Limit repositories, target branches, and push or code-review events.</Step>
  <Step title="Define the SQL scope">Configure paths, extensions, and exclusions.</Step>
  <Step title="Configure the gate">Choose blocking thresholds, failure behavior, and feedback.</Step>
  <Step title="Run acceptance tests">Exercise pass, block, no-change, and duplicate-event cases.</Step>
</Steps>

## Expected Result

A connector receives repository events, identifies relevant SQL changes, creates a PawSQL review, and links the result to the corresponding revision or code review.

## Verification

Confirm the connector returns the gate status and a secure report link for the relevant SQL changes.
