GitHub logo
Code & Repositories

GitHub AI Integration

Index GitHub docs and keep them synced on every push

What is it?

About GitHub

GitHub is the world's largest code hosting platform. Engineering teams store not just code but also architecture decision records, runbooks, API references, and internal documentation in GitHub repositories.

Integration capabilities

How BeforeQuery works with GitHub

Everything you can do once the GitHub integration is connected.

Selective path indexing

Choose exactly which paths to index: docs/, README.md, ADRs/, runbooks/, or any markdown files. BeforeQuery only indexes what you specify.

Webhook auto-sync on push

BeforeQuery installs a webhook verified with X-Hub-Signature-256. Every push to your configured branch triggers an incremental re-index — docs stay current without manual intervention.

Self-hosted GitHub Enterprise

The GitHub integration supports GitHub Enterprise Server installations in addition to GitHub.com.

Branch-aware indexing

Configure which branch is indexed — main for stable docs, or a separate docs branch. Switch branches without re-configuring the integration.

Setup

How to connect GitHub

  1. Step 01

    In BeforeQuery, create a source of type GitHub and authenticate with your GitHub account or organization.

  2. Step 02

    Select the repository and configure which paths and branch to index. BeforeQuery will install the push webhook automatically.

  3. Step 03

    Run the first sync. Subsequent syncs trigger automatically on every push to the configured branch.

GitHub — Frequently Asked Questions

Common questions about connecting BeforeQuery to GitHub.

BeforeQuery installs a push webhook in your GitHub repository verified with X-Hub-Signature-256. Every push to the configured branch triggers an incremental re-index. Only the changed files are re-processed, so syncs are fast even for large repositories.
You can specify any combination of paths: docs/, README.md, ADRs/, runbooks/, or arbitrary markdown file patterns. BeforeQuery indexes only the paths you configure — source code files are never indexed unless you explicitly include them.
Yes. BeforeQuery supports GitHub Enterprise Server in addition to GitHub.com. Provide your GitHub Enterprise base URL during source configuration, and the webhook and API calls will route to your self-hosted instance.
Yes. A single BeforeQuery knowledge base can have multiple GitHub sources, each pointing to a different repository or branch. All indexed content is searched together in a single RAG query, with the source shown identifying the source repository for each answer.
Yes. BeforeQuery stores GitHub credentials encrypted at rest. Credentials are never logged or exposed in responses. You can revoke access at any time by removing the BeforeQuery GitHub App installation from your repository or organization settings.

Ready to connect GitHub?

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