AI-powered automated code review assistant for GitLab merge requests using Google's Gemini AI.
-
Pull the latest image:
docker pull ghcr.io/banksemi/gitlab-code-guardian:latest
-
Run with environment variables:
docker run -d \ -p 8080:8080 \ -e LLM_GOOGLE_BASE_URL=your_google_ai_url \ -e LLM_GOOGLE_API_KEY=your_google_api_key \ -e GITLAB_BASE_URL=your_gitlab_url \ -e GITLAB_TOKEN=your_gitlab_token \ -e GITLAB_WEBHOOK_SECRET=your_webhook_secret \ -e GITLAB_BOT_ID=your_bot_id \ -e GITLAB_REPOSITORY=your_repository \ ghcr.io/banksemi/gitlab-code-guardian:latest
-
Set up environment variables:
cp .env.example .env
-
Configure your
.envfile with the following variables:LLM_GOOGLE_BASE_URL: Google AI API base URLLLM_GOOGLE_API_KEY: Your Google AI API keyLLM_GOOGLE_MODEL: AI model to use (default:gemini-2.5-pro)GITLAB_BASE_URL: Your GitLab instance URLGITLAB_TOKEN: GitLab personal access token with API accessGITLAB_WEBHOOK_SECRET: Secret for webhook authenticationGITLAB_BOT_ID: Bot user ID for filtering self-commentsGITLAB_REPOSITORY: Target repository identifier
-
Build and run with Docker Compose:
docker-compose up --build
Configure your GitLab project webhook:
- URL:
http://your-server:8080/gitlab/webhook - Secret Token: Same as
GITLAB_WEBHOOK_SECRET - Trigger events: Merge request events, Comments