GitHub Integration Guide
Work with Devin directly in your repos
Why integrate Devin into GitHub?
Integrating Devin into your GitHub organization allows Devin to create pull requests, read and respond to your PR comments, etc. This lets Devin be a true collaborator on your engineering team.
The setup is easy! Go to preview.devin.ai > Settings > Integrations, Connect your GitHub and follow the GitHub app integration steps on the screen.
- Make sure to select access to the relevant repos and review permissions
- Once the set up is done, you should be able to view all the repos Devin now has access to in the top right corner of the Devin homepage.
Setting up the Integration
- In your Devin account at preview.devin.ai, go to Settings > Integrations, and click the “Connect” button to integrate your organization with the Devin GitHub app.
- This will redirect you to GitHub where you can select the GitHub account and repositories to connect Devin, and review the relevant permissions.
- If you’re setting up the GitHub integration on behalf of your organization, make sure to select your company’s account. Note that you will not be able to set up a simultaneous personal Devin-GitHub integration.
- Once you’ve completed all the set up steps in Github, you will be directed to the Devin account settings page where you can confirm the integration is set up.
- [For Enterprise customers only] Add the
cognition-team
GitHub account to the relevant repositories. This gives us the ability to help onboard Devin onto your codebase and monitor Devin’s activity.
Using Devin with the GitHub Integration
Once the integration is set up, you can go to the Devin web application and you should be able to see all the connected repositories on the right-hand side.
You can now start running a session and Devin should be able to access your connected GitHub repositories!
Just start a new session and tell Devin the name of the repo to clone.
Setting Devin’s Permissions
Managing Permissions
You can always adjust permissions through the Integration configuration page in Github once the app is connected:
- Step 1: Go to the GitHub Integration settings
- Step 2: Navigate to Devin.ai Integration and click “Configure”
- Step 3: Scroll to the “Repository access” section to manage permissions
Devin requires the following permissions:
Read access to:
Permission | Description |
---|---|
`dependabot alerts | Allows Devin to resolve dependabot alerts on your behalf (i.e. bumping dependency versions) |
actions | Allows Devin to view the actions configured for a repository in order to understand if Devin’s changes pass CI |
checks | Allows Devin to view the checks configured for a repository in order to understand if Devin’s changes pass CI |
commit statuses | Allow Devin to view if a commit passes CI |
deployments | Allow Devin to view which versions of a repository were deployed |
metadata | Allow Devin to view crucial metadata about a repository such as who owns it |
packages | Allow Devin to view which versions of a repository were shipped as a package |
pages | Allow Devin to consult pages associated with a repository, e.g. to view documentation |
repository advisories | Allow Devin to view security advisories related to a repo in order to help fix security issues |
repository hooks | Allow Devin to view the hooks configured for a repository, e.g. linting and type checking |
repository projects | Allow Devin to view projects associated with a repository, e.g. to retrieve information about a task |
Read and write access to:
Permission | Description |
---|---|
code | Allow Devin to contribute to the codebase |
discussions | Allow Devin to contribute to discussions |
issues | Allow Devin to open new issues |
pull requests | Allow Devin to create new PRs |
workflows | Allow Devin to set up new workflows, e.g. to help configure CI/CD |
We request these permissions so that Devin can work in your repository just as a regular contributor. Specifically, we permit Devin to push new branches, open PRs, and contribute to PR discussions, which is essential for Devin to productively contribute to your codebase.
Security Considerations
Some additional information regarding Devin’s permissions in GitHub:
- We recommend enabling branch protections on master to ensure checks are enforced before Devin can merge any changes.
- If Devin is connected to your organization’s GitHub account then it will have the same permissions for any user with access to the GitHub and Devin organizations.
- Devin will not mirror the permissions of the user running a session with Devin, it will retain the permissions granted at the org-level.
- Devin cannot create new repos in your GitHub account.