GitLab logo
Code & Repositories

GitLab AI Integration

Sync GitLab repository docs with webhook auto-indexing

What is it?

About GitLab

GitLab is a complete DevOps platform used by enterprises and open-source projects, with a particularly strong following among teams that prefer self-hosted version control. Many organizations store their internal documentation entirely within GitLab repositories.

Integration capabilities

How BeforeQuery works with GitLab

Everything you can do once the GitLab integration is connected.

Self-hosted GitLab support

Connect BeforeQuery to any GitLab instance — gitlab.com, self-managed Community Edition, or Enterprise Edition — using a personal access token or deploy token.

GitLab token webhook verification

Incoming webhooks from GitLab are verified with the X-Gitlab-Token header, ensuring only authenticated GitLab push events trigger re-indexing.

Configurable path and branch scope

Index specific directories (docs/, wiki/) on a chosen branch. Exclude files matching glob patterns to skip generated output.

GitLab Wiki indexing

Optionally index your GitLab project or group wiki alongside repository markdown files.

Setup

How to connect GitLab

  1. Step 01

    Add a GitLab source in BeforeQuery and enter your GitLab instance URL and access token.

  2. Step 02

    Select the repository, branch, and paths to index. BeforeQuery registers a push webhook in your GitLab project automatically.

  3. Step 03

    Trigger the first sync. The index updates automatically on every push to the configured branch going forward.

GitLab — Frequently Asked Questions

Common questions about connecting BeforeQuery to GitLab.

Yes. BeforeQuery connects to any GitLab instance — gitlab.com, self-managed Community Edition, or Enterprise Edition. Provide your instance URL and a personal access token or deploy token during source configuration.
BeforeQuery verifies incoming GitLab push webhooks using the X-Gitlab-Token header. You configure a shared secret token when BeforeQuery registers the webhook in your GitLab project. Only requests with the correct token trigger a re-index.
Yes. You can enable GitLab Wiki indexing in your BeforeQuery source settings to index project and group wiki pages alongside repository markdown files. Both sources are searched together in a single query.
Yes. Configure glob exclusion patterns in your BeforeQuery source settings to skip generated output files, build artifacts, or any paths you do not want indexed. For example, exclude docs/generated/** to skip auto-generated API docs.
Yes. A single BeforeQuery knowledge base can have multiple GitLab sources from different repositories or instances. All content is searched together, with the source shown identifying the source repository for each answer.

Ready to connect GitLab?

Start free. No credit card required. Connect your first integration in under 5 minutes.