GitHubRepoViewer
Navigates and fetches content from GitHub repositories.
Basic Information
- Type:
haystack_integrations.github.src.haystack_integrations.components.connectors.github.repo_viewer.GitHubRepoViewer
Inputs
| Parameter | Type | Default | Description |
|---|---|---|---|
| repo | Optional[str] | None | Repository in format "owner/repo" |
| path | str | Path within repository (default: root) | |
| branch | Optional[str] | None | Git reference (branch, tag, commit) to use |
Outputs
| Parameter | Type | Default | Description |
|---|---|---|---|
| documents | List[Document] | Dictionary containing list of documents |
Overview
Work in Progress
Bear with us while we're working on adding pipeline examples and most common components connections.
Navigates and fetches content from GitHub repositories.
For directories:
- Returns a list of Documents, one for each item
- Each Document's content is the item name
- Full path and metadata in Document.meta
For files:
- Returns a single Document
- Document's content is the file content
- Full path and metadata in Document.meta
For errors:
- Returns a single Document
- Document's content is the error message
- Document's meta contains type="error"
Usage Example
components:
GitHubRepoViewer:
type: github.src.haystack_integrations.components.connectors.github.repo_viewer.GitHubRepoViewer
init_parameters:
Parameters
Init Parameters
These are the parameters you can configure in Pipeline Builder:
| Parameter | Type | Default | Description |
|---|---|---|---|
| github_token | Optional[Secret] | None | GitHub personal access token for API authentication |
| raise_on_failure | bool | True | If True, raises exceptions on API errors |
| max_file_size | int | 1000000 | Maximum file size in bytes to fetch (default: 1MB) |
| repo | Optional[str] | None | Repository in format "owner/repo" |
| branch | str | main | Git reference (branch, tag, commit) to use |
Run Method Parameters
These are the parameters you can configure for the component's run() method. This means you can pass these parameters at query time through the API, in Playground, or when running a job. For details, see Modify Pipeline Parameters at Query Time.
| Parameter | Type | Default | Description |
|---|---|---|---|
| repo | Optional[str] | None | Repository in format "owner/repo" |
| path | str | Path within repository (default: root) | |
| branch | Optional[str] | None | Git reference (branch, tag, commit) to use |
Was this page helpful?