GitLab Personal Access Token Setup
To integrate Recce with your GitLab project, you'll need to create a Personal Access Token (PAT) with appropriate permissions.
Token Scope Requirements
Recce supports two different permission levels depending on your needs:
| Scope | Permissions | Features Available |
|---|---|---|
api |
Full API access (read and write) | • View and track merge requests • Receive generated summaries and notes on MRs from Recce • Full integration capabilities |
read_api |
Read-only API access | • View and track merge requests • Cannot receive generated summaries and notes on MRs from Recce |
Important: Choose the Right Scope
If you want Recce to automatically post validation summaries and notes directly to your merge requests, you must use
the api scope. The read_api scope only allows Recce to read merge request information but cannot write comments or
summaries back to GitLab.
How to Create a Personal Access Token
Follow these steps to create a Personal Access Token in GitLab:
-
Navigate to Personal Access Token Settings in GitLab
-
Create New Token
- Click Add new token button
- Enter a descriptive Token name (e.g., "Recce Integration")
- Set an Expiration date
-
Select Scopes
Choose one of the following based on your needs:
Option A: Full Integration (Recommended)
- ✅apiscope
- This enables Recce to post validation summaries and notes to your merge requestsOption B: Read-Only Access
- ✅read_apiscope
- ⚠️ You will not receive generated PR summaries and notes on your MRs from Recce -
Generate Token
- Click Create personal access token
- Important: Copy the token immediately - you won't be able to see it again!
-
Save Token Securely
- Store the token in a secure location
Using Your Token with Recce
Once you have your Personal Access Token:
- Navigate to Recce settings
- Select GitLab integration
- Paste your Personal Access Token
- Complete the connection setup
Troubleshooting
Token not working?
- Verify you've selected the correct scope (
apiorread_api) - Check that the token hasn't expired
- Ensure you have appropriate project permissions (Maintainer or Owner role)
Not receiving summaries on merge requests?
- Verify your token uses the
apiscope (not justread_api) - Check that Recce has write permissions to your project
Still having issues?
- Please reach out to us on our Discord or via email at
[email protected]