$ account anc95
This repository implements an AI-powered code review bot for GitHub. It listens for pull request events (opened, synchronize) and uses OpenAI's language models (or Azure OpenAI, GitHub Models) to automatically review code diffs and post inline comments and summary reviews. The system supports multiple deployment modes: a Probot-based GitHub App, a GitHub Action, an AWS Lambda function, and a Vercel serverless function. The core logic is in `src/bot.ts` (event handling, file filtering, review creation) and `src/chat.ts` (LLM API abstraction). The architecture is a monolith with adapter layers for each platform. External dependencies include the OpenAI/LLM API, GitHub API via Octokit, and minimatch for glob-based file filtering. The bot is configurable via environment variables for model selection, prompt customization, language, and file inclusion/exclusion patterns. It also implements an incremental review feature to reduce API costs by only re-reviewing files changed since the last bot review.