Development
GitLab Connector
Index a GitLab project: its Markdown files: including on a self-hosted instance.
Prerequisites
- A GitLab project you can read
- A Personal Access Token with the `read_api` scope
Data ingested
When you connect GitLab, the following content becomes searchable. Every answer that uses it cites it.
| Content | What is kept |
|---|---|
| Markdown files | Every `.md` file of the default branch, path and content kept |
| Project files | Other text files when *include source code* is on |
Setup
Configuration happens in the dashboard, under Integrations. No API call is needed for a normal setup.
Create a token
gitlab.com → Preferences → Access tokens, scope `read_api`.
Enter the project
Integrations → Add source → GitLab, then the project path in the form `group/project`.
Set the host for a self-hosted instance
Leave `https://gitlab.com` for the cloud. For your own instance, put its full URL: a wrong host answers with a redirect, not an error.
Connect
Indexing starts immediately and the source row shows progress.
Configuration options
| Field | Description | Required |
|---|---|---|
| Project | `group/project` of the project to index | Yes |
| Token | Personal Access Token with `read_api` | Yes |
| Host | GitLab base URL. Defaults to `https://gitlab.com` | No |
| Include source code | Index the Markdown files of the default branch | No |
Best practices
- •On a self-hosted instance, use a token that can read the project even if it is private: a token scoped to another namespace returns an empty listing.
- •One connector per project. Indexing a whole group pulls in projects you did not mean to expose to the assistant.
Troubleshooting
The path is case-sensitive and must include the group: `group/project`, not `project`.
The project has no Markdown file on its default branch. Turn on *include source code* if the documentation is in another format.
The host must be reachable from the internet, and its certificate valid. A private address cannot be indexed.
Next steps
Once the source is connected and indexed, ask a question from the chat and check that the answer cites this source. A source that never appears in a citation is usually a source with nothing indexed: see Troubleshooting above.
