PR Reviewer
AI-powered code review built into VS Code. Sign in, connect your GitLab project, and get instant AI feedback on your staged changes — directly from the side panel or before every commit via a git hook.
Requirements
- VS Code
1.84.0 or higher
- Node.js
18+
- A git repository
- A
@grazitti.com Google account or work email
- GitLab Personal Access Token (
api + read_repository scopes)
- Gemini API Key (get one at makersuite.google.com)
Getting Started
1. Install the Extension
Search for PR Reviewer in the VS Code Extensions Marketplace (Ctrl+Shift+X) and click Install.
2. Sign In
Open the PR Reviewer side panel from the Activity Bar. You'll see the sign-in screen with two options:
- Continue with Google — opens a browser tab, sign in with your
@grazitti.com account, and you'll be redirected back automatically.
- Work Email (OTP) — enter your
@grazitti.com email, receive a 6-digit code, and verify it in the panel.
3. Add Credentials
On first login, you'll be prompted to add your credentials:
| Field |
Description |
| GitLab Personal Access Token |
glpat-xxxx — needs api + read_repository scopes |
| Gemini API Key |
AIza... — from Google AI Studio |
Click Save & Load Projects to load your GitLab repositories.
4. Connect a Project
Your GitLab projects will appear in the panel with two states:
- Not Configured — click Setup to register the project (select team and project type)
- Configured — click Open Folder to link your local repo folder to the project
When you click Open Folder, the extension:
- Validates the selected folder matches the GitLab project's remote URL
- Saves the project config to
~/.pr-reviewer
- Installs a
pre-commit git hook automatically
5. Review Your Code
Automatically on commit — once the git hook is installed, every git commit triggers a review:
git add .
git commit -m "your message"
The review output appears in the PR Reviewer output channel in VS Code.
Side Panel
The side panel (Activity Bar) shows:
- Your email and name after sign-in
- Admin Panel link — visible to admin users
- ⓘ Documentation — opens the full setup documentation
- Refresh — reloads the project list from GitLab
- Sign Out — signs you out and clears the session
- ✕ Close — closes the side panel
- ⚙️ Update Key and Token — collapsible section to update your GitLab token or Gemini API key without re-signing in
Commands
| Command |
Description |
PR Reviewer: Open Panel |
Focus the PR Reviewer side panel |
PR Reviewer: Logout |
Sign out and clear credentials |
Updating Credentials
To update your GitLab token or Gemini API key after initial setup, expand the ⚙️ Update Key and Token section in the panel. Leave a field blank to keep the existing value.
Troubleshooting
| Symptom |
Fix |
| Review doesn't run on commit |
Click Open Folder again to reinstall the git hook |
Wrong project selected |
The folder you picked doesn't match the GitLab project's remote URL — select the correct folder |
Only @grazitti.com emails are allowed |
Sign in with your company email or use Google sign-in |
| Projects not loading |
Check your GitLab token has api + read_repository scopes, then use Refresh |
Could not load projects |
Update your Gitlab Personal Token |
| Admin Panel link not visible |
Only available for users with admin role |