diff --git a/.env.rag.example b/.env.rag.example index bb28594..abe035b 100644 --- a/.env.rag.example +++ b/.env.rag.example @@ -66,3 +66,14 @@ S3_ACCOUNT1_SCHEDULES= #SERPAPI_KEY=your-serpapi-api-key #SERPAPI_QUERIES="OpenAI news, Bitcoin price, Tesla updates" #SERPAPI_SCHEDULES=60 + +# GITHUB CONNECTORS (optional): + +#GITHUB1_PERSONAL_TOKEN=your-personal-access-token +# GitHub App auth (alternative to personal token): +#GITHUB1_APP_ID= +#GITHUB1_APP_INSTALLATION_ID= +#GITHUB1_APP_PRIVATE_KEY= +#GITHUB1_OWNER=your-org-or-username +#GITHUB1_REPO=your-repo-name +#GITHUB1_SCHEDULES=60 diff --git a/README.md b/README.md index f297b0e..08b5368 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ interact with your knowledge with ease! * S3 (any AWS compatible Object Storage including AWS, Contabo, B2, Cloudflare R2, OVH, etc) * MediaWiki (all versions supported, both private and public wiki) * SerpAPI +* GitHub (repository files and issues, PAT or GitHub App auth) ### 🌐 Extra connectors @@ -47,7 +48,6 @@ Over 100 extra connectors are available at request, including the most popular o * Google Drive * Jira * Slack -* GitHub * Gitlab * Notion * Microsoft Teams @@ -228,6 +228,47 @@ SERPAPI1_QUERIES=aaa SERPAPI1_SCHEDULES=3600 ```` +### GitHub Connector + +The GitHub connector ingests repository files and optionally issues from a GitHub repository. +Supports PAT and GitHub App authentication, branch or commit targeting, file extension/directory +filters, and issue label filters. + +```yaml +# config.yaml + +sources: + - type: "github" + name: "github1" + config: + # Auth — use one of: personal_token OR github_app_* credentials + personal_token: "${GITHUB1_PERSONAL_TOKEN}" + owner: "${GITHUB1_OWNER}" # repository owner / org + repo: "${GITHUB1_REPO}" # repository name + branch: "main" # default "main" (mutually exclusive with commit_sha) + include_extensions: "md,py" # optional, comma-separated + include_issues: false # set true to also ingest issues + concurrent_requests: 5 # optional, default 5 + schedules: "${GITHUB1_SCHEDULES}" +``` + +```dotenv +# .env.rag + +GITHUB1_PERSONAL_TOKEN=ghp_xxxxxxxxxxxx +GITHUB1_OWNER=your-org-or-username +GITHUB1_REPO=your-repo-name +GITHUB1_SCHEDULES=3600 +``` + +For GitHub App authentication, replace `personal_token` with: + +```yaml + github_app_id: "${GITHUB1_APP_ID}" + github_app_installation_id: "${GITHUB1_APP_INSTALLATION_ID}" + github_app_private_key: "${GITHUB1_APP_PRIVATE_KEY}" +``` + ## Embeddings and Inference ### Embeddings support diff --git a/config.yaml.example b/config.yaml.example index cec4fac..12addd4 100644 --- a/config.yaml.example +++ b/config.yaml.example @@ -40,6 +40,30 @@ sources: # queries: "${SERPAPI_QUERIES}" # schedules: "${SERPAPI_SCHEDULES}" + # GITHUB CONNECTORS (optional): + + #- type: "github" + # name: "github1" + # config: + # # Auth — use one of: personal_token OR github_app_id + github_app_installation_id + github_app_private_key + # personal_token: "${GITHUB1_PERSONAL_TOKEN}" + # #github_app_id: "${GITHUB1_APP_ID}" + # #github_app_installation_id: "${GITHUB1_APP_INSTALLATION_ID}" + # #github_app_private_key: "${GITHUB1_APP_PRIVATE_KEY}" + # owner: "${GITHUB1_OWNER}" + # repo: "${GITHUB1_REPO}" + # branch: "main" # optional, default "main" (mutually exclusive with commit_sha) + # #commit_sha: "" # optional (mutually exclusive with branch) + # include_extensions: "md,py" # optional, comma-separated (mutually exclusive with exclude_extensions) + # #exclude_extensions: "" # optional (mutually exclusive with include_extensions) + # #include_directories: "" # optional, comma-separated (mutually exclusive with exclude_directories) + # #exclude_directories: "" # optional (mutually exclusive with include_directories) + # include_issues: false # optional, default false + # #include_issues_labels: "" # optional, comma-separated (mutually exclusive with exclude_issues_labels) + # #exclude_issues_labels: "" # optional (mutually exclusive with include_issues_labels) + # concurrent_requests: 5 # optional, default 5 + # schedules: "${GITHUB1_SCHEDULES}" + embedding: # can be `local` or `openrouter`/`openai` provider: local