Automated Issue Resolution with Devin’s API
In production, the process of automatically resolving code issues using Devin’s API is streamlined and efficient. Below is a high-level overview of the steps involved:1. Process Overview
- Pull Request is opened: A pull request (PR) is submitted to the repository with changes that may contain issues identified by a code scanning tool.
- GitHub Action is triggered: The opening of the PR automatically triggers a GitHub Action workflow.
- GitHub Action calls Devin API: The GitHub Action sends a request to the Devin API, passing the identified issues for automated resolution.
- Devin session is initialized: A Devin session spins up, receiving the context of the issue and attempting to resolve it based on the provided data.
- Devin proposes PR for human review: Once the issue is resolved, Devin generates a PR with the proposed changes and submits it for human review.
2. Steps to Accomplish This
To integrate Devin’s API with your CI/CD pipeline, you will need to complete the following configurations:-
Configure SonarQube for CI & API support:
- Ensure that SonarQube is configured to support continuous integration (CI) and API integration. If you prefer not to set up SonarQube for API access, you can use a cookie for authentication. Learn more about this setup here.
-
Configure GitHub environment to hold the required secrets:
- Set up the GitHub environment to securely store the necessary secrets, such as authentication tokens and configuration keys, to interact with Devin’s API and other integrated tools.
- Test the Integration
- View Devin Sessions Page
1. Create SONAR_TOKEN:
- Click on your account icon in the top right of SonarQube.
- Select Security from the dropdown.
- Under Tokens, click Generate Tokens.
- Name the token and click Generate.
- Copy the generated token for use in GitHub Actions.

2. Create SONAR_PROJECT
- Select the project in SonarQube.
- Click Information in the bottom left.
- Scroll down to find the project key.

3. Create SONAR_ORG
Refer to the steps above to locate your organization details in SonarQube. Once you have all the required values, you’re ready to configure the GitHub Action.This assumes you have a local SonarCloud properties file
sonar-project.properties
that specifies:

