Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 26, 2025

Migrates the complete BLT-AIBot codebase from PR #4522 to this dedicated Toasty repository.

Fixes #1 #2 #3 #4 #5 #6 #11

AIBot Django App (toasty/aibot/)

  • Webhook Handler (main.py): GitHub webhook endpoint processing PR, issue, installation, push, and comment events
  • Celery Tasks (tasks.py): Background processing for AI-powered PR reviews, issue analysis, and comment responses
  • Gemini Integration (gemini_api.py): Text generation and embedding via Google Gemini
  • Qdrant Integration (qdrant_api.py): Semantic code search, collection management, embedding storage
  • GitHub API (github_api.py, gh_token_manager.py): JWT-based auth, installation token caching, API client with retry logic
  • Code Chunking (chunk_utils.py): AST-aware Python chunking, YAML/JSON/HTML handlers, token-aware splitting
  • Models (db_models.py): GithubAppInstallation, GithubAppRepo, AibotComment

Infrastructure

  • Docker Compose: PostgreSQL, Redis, Qdrant, Celery worker services
  • Settings: Environment-based config for all services, production SECRET_KEY enforcement
  • Dependencies: google-genai, qdrant-client, celery[redis], langchain, psycopg2-binary

Endpoints

path("aibot/", aibot_webhook_entrypoint, name="aibot_webhook_entrypoint")
path("aibot/health/", aibot_health_check, name="aibot_health_check")

Configuration

See .env.example for required environment variables including GitHub App credentials, Gemini API key, and Qdrant settings.

Original prompt

move this PR to here OWASP-BLT/BLT#4522


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 26, 2025 05:12
This commit adds the complete BLT-AIBot functionality including:
- GitHub webhook endpoint for PR, issue, and comment processing
- Gemini AI integration for code analysis and response generation
- Qdrant vector DB integration for semantic code search
- Celery tasks for background processing
- Django models for tracking installations, repos, and comments
- Static analysis integration (Bandit, Ruff)
- Health check endpoint
- Docker Compose setup with PostgreSQL, Redis, and Qdrant services

Fixes #11 #1 #6 #5 #4 #3 #2

Co-authored-by: DonnieBLT <[email protected]>
… PostgreSQL support

- Fix spelling error: "Recieved" -> "Received" in tasks.py
- Add PostgreSQL database support with DATABASE_URL environment variable
- Improve SECRET_KEY handling: raise error in production if not set
- Add DEBUG and ALLOWED_HOSTS as configurable environment variables
- Add psycopg2-binary dependency for PostgreSQL
- Update .env.example with additional database configuration

Co-authored-by: DonnieBLT <[email protected]>
Copilot AI changed the title [WIP] Move pull request 4522 to new location Migrate BLT-AIBot from OWASP-BLT/BLT to Toasty repository Nov 26, 2025
Copilot AI requested a review from DonnieBLT November 26, 2025 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate Gemini API in the backend

2 participants