Skip to content

feat(kb): GitHub repositories as a knowledge source — a github/git connector that reuses the Codebase Analytics code-source pipeline #19717

Open

Description

@mrveiss

Problem

A GitHub repository cannot be added as a knowledge-base source. The connector picker has GitLab, Gitea and Forgejo (knowledge/connectors/gitlab.py, #9011), but no GitHub type is registered.

Codebase Analytics already clones and indexes GitHub repositories as code sources (api/codebase_analytics/source_storage.py, chromadb_storage.py, collection autobot_code). On 2026-10-26 one public GitHub repo had 3,625 indexed chunks, and its owner still could not reach it from the knowledge base or from chat (#17625).

Fix

Use one implementation, not a second clone path.

  • Add a github connector type (and a generic git one for any https remote) that delegates to the existing code-source machinery: same clone, same source_id, same autobot_code collection, same owner and access fields. A repo added from Knowledge and the same repo added from Codebase Analytics resolve to one source record.
  • Optionally ingest the README, docs and wiki as KB documents through add_document, so prose is retrievable as documents and not only as code chunks.
  • Private repos authenticate through the canonical secrets manager (credential store), never a token kept in connector config.
  • Chat reads the indexed content through blocker(kb): 6,741 documentation chunks and 11,241 code chunks are vectorised and chat's retrieval path queries neither #17625's autobot_code leg.

Acceptance criteria

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions