{"id":29791040,"url":"https://github.com/sincerelyyyash/gitbot","last_synced_at":"2026-04-12T17:48:55.984Z","repository":{"id":302890947,"uuid":"1013683083","full_name":"sincerelyyyash/gitbot","owner":"sincerelyyyash","description":"gitbot is an AI-powered GitHub Assistant that automates Q\u0026A for issues and comments using FastAPI, LangChain, ChromaDB, and Gemini LLM. It is designed for modularity, production-readiness, and easy extensibility.","archived":false,"fork":false,"pushed_at":"2025-07-13T18:05:27.000Z","size":192,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-13T20:24:55.796Z","etag":null,"topics":["chromadb","fastapi","generative-ai","github-app","langchain","rag"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sincerelyyyash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-04T09:44:07.000Z","updated_at":"2025-07-13T18:05:30.000Z","dependencies_parsed_at":"2025-07-04T16:55:30.487Z","dependency_job_id":null,"html_url":"https://github.com/sincerelyyyash/gitbot","commit_stats":null,"previous_names":["sincerelyyyash/gitbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sincerelyyyash/gitbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sincerelyyyash%2Fgitbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sincerelyyyash%2Fgitbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sincerelyyyash%2Fgitbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sincerelyyyash%2Fgitbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sincerelyyyash","download_url":"https://codeload.github.com/sincerelyyyash/gitbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sincerelyyyash%2Fgitbot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267442931,"owners_count":24087899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chromadb","fastapi","generative-ai","github-app","langchain","rag"],"created_at":"2025-07-28T00:13:41.663Z","updated_at":"2026-04-12T17:48:55.971Z","avatar_url":"https://github.com/sincerelyyyash.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitbot\n\n## Overview\n\ngitbot is an AI-powered GitHub Assistant that automates Q\u0026A, analyzes issues, and reviews pull requests using FastAPI, LangChain, ChromaDB, and the Gemini LLM. It is designed for modularity, production-readiness, and easy extensibility.\n\n## Features\n\n- **Advanced Issue Analysis:**\n  - **Similarity Detection:** Identifies duplicate or related issues using a hybrid approach of semantic, keyword, and pattern-based similarity.\n  - **Automated Triage:** Automatically comments on new issues with findings, suggests labels, and can identify invalid or incomplete issue reports.\n- **Comprehensive Pull Request Review:**\n  - **Automated Code Review:** Analyzes PRs for security vulnerabilities, code quality issues, complexity, and potential bugs.\n  - **Actionable Feedback:** Posts PR reviews with detailed comments, assigns a review priority (`low` to `critical`), and adds labels like `security-risk` or `needs-refactor`.\n- **Intelligent RAG System:**\n  - **Automatic Content Indexing:** On installation, automatically indexes repository content including code, documentation, issues, and pull requests.\n  - **Persistent Knowledge Base:** Uses a persistent ChromaDB vector store for each repository's knowledge base.\n  - **Scheduled Re-indexing:** Periodically and automatically keeps the knowledge base up-to-date with repository changes.\n- **User Authentication \u0026 Authorization:**\n  - **GitHub OAuth 2.0 Integration:** Secure user authentication using GitHub OAuth with JWT token management.\n  - **Role-Based Access Control:** Hierarchical role system (user, admin, owner) with granular permissions.\n  - **Repository Access Management:** Fine-grained repository access control with read, write, and admin levels.\n  - **Session Management:** Database-backed session tracking with automatic cleanup and token refresh.\n- **Robust Infrastructure:**\n  - **GitHub App Integration:** Authenticates as a GitHub App and handles a wide range of webhook events (installations, pushes, issues, PRs).\n  - **Modular, Production-Ready Structure:** Clean separation of API, models, services, and core logic.\n  - **Admin \u0026 Monitoring:** Includes admin endpoints for managing indexing and a circuit breaker for improved resilience.\n  - **Dockerized:** Easy to run and deploy in any environment.\n\n## Project Structure\n\n```\napp/\n  ├── __init__.py\n  ├── main.py                # FastAPI app, includes routers\n  ├── api/\n  │   ├── __init__.py\n  │   └── webhook.py         # Webhook endpoint \u0026 event routing\n  ├── core/\n  │   ├── __init__.py\n  │   ├── rate_limiter.py # Manages GitHub API rate limits\n  │   ├── github_utils.py    # GitHub API/auth helpers\n  │   ├── quota_manager.py   # Manages Gemini API quota\n  │   └── rag_system.py      # RAG system logic\n  ├── models/\n  │   ├── __init__.py\n  │   └── github.py          # Pydantic models for GitHub payloads\n  ├── services/\n  │   ├── __init__.py\n  │   ├── indexing_service.py # Manages repository content indexing queue\n  │   ├── issue_similarity_service.py # Logic for finding similar issues\n  │   ├── pr_analysis_service.py # Logic for analyzing pull requests\n  │   └── rag.py             # Business logic for RAG, issues, and PRs\n  ├── middleware/\n  │   └── rate_limiter.py      # Middleware for rate limiting\n  └── config.py              # Environment/config management\n\nrequirements.txt\nDockerfile\n.dockerignore\n.env.example\nREADME.md\ntests/\n  └── ... multiple test files ...\n```\n\n## Setup \u0026 Usage\n\n### 1. Clone \u0026 Configure\n\n```bash\ngit clone https://github.com/sincerelyyyash/gitbot.git\ncd gitbot\ncp .env.example .env  # Fill in your GitHub App and Gemini credentials\n```\n\n### 2. Build \u0026 Run with Docker\n\n```bash\ndocker build -t gitbot-backend .\ndocker run -p 8050:8050 --env-file .env gitbot-backend\n```\n\n### 3. Local Development\n\n- Install dependencies: `pip install -r requirements.txt`\n- Run: `uvicorn app.main:app --reload`\n\n### 4. Testing\n\n```bash\npytest tests/\n```\n\n## Environment Variables\n\nSee `.env.example` for all required variables:\n- `GITHUB_APP_ID`\n- `GITHUB_PRIVATE_KEY`\n- `GITHUB_WEBHOOK_SECRET`\n- `GITHUB_OAUTH_CLIENT_ID`\n- `GITHUB_OAUTH_CLIENT_SECRET`\n- `GITHUB_OAUTH_REDIRECT_URI`\n- `JWT_SECRET_KEY`\n- `JWT_ALGORITHM`\n- `JWT_ACCESS_TOKEN_EXPIRE_MINUTES`\n- `JWT_REFRESH_TOKEN_EXPIRE_DAYS`\n- `GEMINI_API_KEY`\n- `CHROMA_PERSIST_DIR`\n- `ADMIN_TOKEN`\n\n## Limitations / Not Yet Supported\n\n- No multi-channel support (GitHub webhooks only)\n- No web UI or admin interface (admin tasks are API-based)\n- Limited support for very large repositories (indexing can be time-consuming)\n- Tool usage (e.g., running linters) is not yet implemented\n\n## Contributing\n\nPRs and issues welcome! See the code structure above for guidance on where to add new features or logic.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsincerelyyyash%2Fgitbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsincerelyyyash%2Fgitbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsincerelyyyash%2Fgitbot/lists"}