Why integrate Devin with GitLab?
Integrating Devin with your GitLab repositories allows Devin to create merge requests, read and respond to your MR comments, and collaborate effectively with your team. This lets Devin be a true collaborator on your engineering team.Using a self-hosted GitLab instance? We support GitLab Self-Managed (version 15.0 and later) for users on our Enterprise plan. Simply click the dropdown on the “Connect” button and select Connect to self-hosted instance. See the GitLab Self-Managed Integration guide for full setup instructions.The same dropdown also offers Connect service account, which connects a GitLab.com service account (or a dedicated user account on the Free tier) with a personal access token that has the
api scope instead of the OAuth flow below.Setting up the Integration
The setup is easy! Here’s how to get started:- Create a new GitLab account specifically for Devin (just like you’d create a personal account). You’ll use this account, not your personal one, during the integration process.
- In your Devin account, go to Settings > Connections > Gitlab and click “Connect”.
-
You’ll be redirected to GitLab where you should:
- Log in with the GitLab account you created for Devin (not your personal account)
- Grant the necessary permissions for Devin to work with your repositories
- Once completed, you’ll return to the Devin settings page where you can confirm the integration is active.
Webhook Configuration
Configuring a webhook allows Devin to automatically receive real-time notifications when specific events occur in GitLab (such as opening or updating merge requests and commenting on merge requests). To configure the webhook:- In your Devin account, go to Settings > Connections > GitLab
- Click the GitLab connection you want to configure to open its details panel
- On the General tab, click Configure in the Webhook row
- Copy the webhook URL and Secret Token from the dialog
- Follow the dialog’s Group (recommended) or Project steps to add the webhook in GitLab, selecting the Comments, Merge request events, Push events, Issues events, and Pipeline events triggers
Adding a webhook in GitLab requires the Maintainer role on the project, or the Owner role on the group for group webhooks (group webhooks are available on GitLab Premium and Ultimate). When automatic webhook setup is available for your organization, the dialog notes that Devin sets up webhooks on every project and group its GitLab account can administer; use the manual steps only for projects it cannot reach.
Repository Permissions
For Core and Teams users
Once the integration is configured, you can @mention repositories directly in your prompts within the Devin web application.For Enterprise users
Once the integration is configured, you can delegate repositories to specific organizations from Enterprise Settings > Repository Permissions.- Go to Enterprise Repositories
- Select the correct organization
- Open Manage Permissions
- Add the relevant repositories with the appropriate read/write permissions
If repositories do not appear immediately after connecting, Devin refreshes the repository list periodically. You can manually refresh the repository list in Devin.
User Linking
On top of the organization-wide connection, individual users can link their own GitLab account to Devin so that Devin can act under their identity for GitLab operations, such as opening merge requests as the linked user when Open PRs as is set to User or User only under Settings > Devin > Pull requests. To link a personal GitLab account:- Ensure you are a member of a Devin organization whose GitLab integration is set up
- Go to Settings > Connections in your personal account settings
- Find the GitLab row and click Link, then complete the GitLab authorization
Personal Connections only shows integrations for organizations the user belongs to. The GitLab row appears when your organization has a GitLab.com connection. Self-hosted GitLab instances (Enterprise plan) appear as separate Self-hosted GitLab rows labeled with the host, and are linked the same way. If no GitLab row appears, confirm that you are a member of a Devin organization with a GitLab connection.
Using Devin with the GitLab Integration
After connecting GitLab, set up your repositories on Devin’s Machine.How Devin responds to MR comments. Once the webhook is configured, a comment on a merge request that a Devin session is tracking is delivered to that session in real time. By default, this wakes a sleeping session and Devin responds to the comment.To limit this, an organization admin can turn on Require @Devin to respond under Settings > Devin > Pull requests. With that setting enabled, Devin only wakes and responds to comments that start with
@Devin (the devinai prefix is also accepted).Comments that contain (aside) or !aside, or that start with aside, are always ignored regardless of this setting, so you can discuss the MR without waking Devin.Without a webhook, MR comments are not delivered to the session in real time; Devin can still address them if you point them out directly in the session.Best Practices
- Create a dedicated GitLab account for Devin
- Enable branch protections on main/master branches
- Configure the webhook for real-time event notifications
Support
- Create a Slack connect channel with our team at app.devin.ai/settings/support
- Share session links when reporting issues and provide screenshots

