|
|
|
@@ -4,6 +4,7 @@
|
|
|
|
A webhook-based service that automatically generates AI code reviews for Gitea Pull Requests using [xai-review](https://github.com/Nikita-Filonov/ai-review).
|
|
|
|
A webhook-based service that automatically generates AI code reviews for Gitea Pull Requests using [xai-review](https://github.com/Nikita-Filonov/ai-review).
|
|
|
|
|
|
|
|
|
|
|
|
## Features
|
|
|
|
## Features
|
|
|
|
|
|
|
|
* **Integrated with AI**: Uses advanced LLMs for code analysis.
|
|
|
|
* **Zero-config per repository**: Works via a single Gitea System Webhook (or per-repo webhook).
|
|
|
|
* **Zero-config per repository**: Works via a single Gitea System Webhook (or per-repo webhook).
|
|
|
|
* **Custom LLM Support**: Configuring it to use OpenAI, Ollama, vLLM, or any OpenAI-compatible endpoint.
|
|
|
|
* **Custom LLM Support**: Configuring it to use OpenAI, Ollama, vLLM, or any OpenAI-compatible endpoint.
|
|
|
|
* **Secure**: Runs in an isolated Docker container with strict context passed via environment variables.
|
|
|
|
* **Secure**: Runs in an isolated Docker container with strict context passed via environment variables.
|
|
|
|
@@ -24,8 +25,10 @@ Create a `.env` file with the following variables:
|
|
|
|
| Variable | Required | Description | Default |
|
|
|
|
| Variable | Required | Description | Default |
|
|
|
|
| :--- | :--- | :--- | :--- |
|
|
|
|
| :--- | :--- | :--- | :--- |
|
|
|
|
| `GITEA_TOKEN` | **Yes** | A Gitea Access Token. Required permissions: `repository` (Read), `issue` (Read and Write). | |
|
|
|
|
| `GITEA_TOKEN` | **Yes** | A Gitea Access Token. Required permissions: `repository` (Read), `issue` (Read and Write). | |
|
|
|
|
| `GITEA_API_URL` | No | Full URL to your Gitea API (e.g., `http://gitea:3000/api/v1`). | |
|
|
|
|
| `GITEA_API_URL` | **Yes** | Full URL to your Gitea API (e.g., `https://git.example.com/api/v1`). | |
|
|
|
|
| `PORT` | No | Host port to expose the webhook server on. | `3000` |
|
|
|
|
| `PORT` | No | Host port to expose the webhook server on. | `3000` |
|
|
|
|
|
|
|
|
| `REVIEW_MAX_COMMENTS` | No | Maximum total AI comments per PR (context review). Set to `0` to disable. | `3` |
|
|
|
|
|
|
|
|
| `REVIEW_MAX_INLINE_COMMENTS` | No | Maximum inline comments per file. Set to `0` to disable. | `3` |
|
|
|
|
| `OPENAI_API_KEY` | **Yes** | API Key for your LLM provider. Use `dummy` for local models if no auth needed. | |
|
|
|
|
| `OPENAI_API_KEY` | **Yes** | API Key for your LLM provider. Use `dummy` for local models if no auth needed. | |
|
|
|
|
| `OPENAI_BASE_URL` | No | Base URL for the LLM API. Set this for Ollama/vLLM (e.g. `http://host.docker.internal:11434/v1/`). | `https://api.openai.com/v1/` |
|
|
|
|
| `OPENAI_BASE_URL` | No | Base URL for the LLM API. Set this for Ollama/vLLM (e.g. `http://host.docker.internal:11434/v1/`). | `https://api.openai.com/v1/` |
|
|
|
|
| `LLM_MODEL` | No | The model name to request (e.g. `gpt-4o`, `llama3.1`). | `gpt-4o` |
|
|
|
|
| `LLM_MODEL` | No | The model name to request (e.g. `gpt-4o`, `llama3.1`). | `gpt-4o` |
|
|
|
|
|