Set Up AutoMerge
Setup has two steps: connect GitHub or GitLab so AutoMerge can read pull requests or merge requests and CI results, then start Dry run on the repositories you want it to evaluate. Dry run makes no changes to your repositories. It comments its decision and approves or merges nothing.
Open Darkplane → AutoMerge in Dash0. Until Dry run has started on at least one repository, the page shows the Set up AutoMerge checklist instead of its tabs.
Prerequisites
- Organization role: Connecting GitHub or GitLab and starting Dry run require the
Adminrole in your Dash0 organization. Members see the checklist but cannot complete it. - GitHub access: A GitHub owner of each account you connect, to install the Dash0 GitHub App and approve its permissions.
- GitLab access: An Owner or Maintainer of the top-level GitLab group, to create the service account, issue its access token, and add group webhooks. AutoMerge supports GitLab 16.1.0 and newer.
- CI checks (recommended): AutoMerge waits for CI checks to settle before it evaluates on its own, so its score includes the CI result. A repository without CI checks needs Wait for CI turned off, as described in Configure a Repository.
Step 1: Connect GitHub or GitLab
AutoMerge uses the same GitHub and GitLab integrations as Agent0 and AI SDLC Insights. If one is already connected, the checklist marks this step as done.
Connect GitHub
- In the Connect GitHub step, click Connect GitHub.
- Follow Set Up GitHub Integration to install the Dash0 GitHub App and pick the repositories AutoMerge should evaluate.
- Return to Darkplane → AutoMerge. The step reads GitHub connected and shows how many repositories the app is installed on.
If the step reports a problem, click Open GitHub settings and fix the state it names:
- The app has no repositories: Pick the repositories AutoMerge should evaluate.
- This dataset can't read the integration: Add the dataset to the GitHub integration in Settings → Integrations .
- The app is suspended: Unsuspend it in GitHub. While it is suspended, no pull request events arrive.
Approve the GitHub Permissions
AutoMerge needs three permissions from the Dash0 GitHub App:
checks: Post its advisory check run on each pull request.pull_requests: Post its comment and its approving review.contents: Merge pull requests in Auto-merge mode.
If an installation was set up before AutoMerge existed, a warning appears in the page header: AutoMerge needs one more GitHub permission, or a number of them. A GitHub owner of the account has to accept the updated Dash0 GitHub App. Click Review permissions on GitHub, approve the listed permissions, and the warning clears on its own within a minute.
You can start Dry run before the permissions are approved, but its checks and comments only show on GitHub once they are.
Connect GitLab
AutoMerge evaluates merge requests in the groups your GitLab integration connects. The setup is the same as for AI SDLC Insights, with one difference: the service account's access token needs the api scope in addition to read_api.
- In the Connect GitLab step, click Connect GitLab.
- Follow Set Up GitLab Integration to create the group service account, connect your groups, and add the group webhooks with every trigger event it lists. When you create the service account's access token, select both the
read_apiandapiscopes. - In Visible in datasets, select the dataset you open AutoMerge in.
- Return to Darkplane → AutoMerge. The step reads GitLab connected and shows how many groups the integration watches.
If the step reports a problem, click Open GitLab settings and fix the state it names:
- GitLab is connected to another dataset: Add this dataset to the GitLab integration so AutoMerge can read its merge requests.
- The GitLab integration watches no groups: Add the groups AutoMerge should evaluate.
Grant the GitLab Permissions
AutoMerge acts in GitLab as the integration's service account, not as a person:
read_apiscope: Read merge requests, pipelines, and comments.apiscope: Post its comment, its commit status, and its approval, and merge in Auto-merge mode. Without it, AutoMerge evaluates but cannot write anything to GitLab.- Developer role: The service account needs at least the Developer role in each group AutoMerge evaluates. In Auto-merge mode, the protected branch rules must allow Developers to merge.
Dash0 accepts a token with read_api alone when you connect, so it does not warn you if api is missing. If an existing token lacks it, create a new token with both scopes and replace it in the integration.
The api scope lets the service account write to every project it can access. Invite it only to the groups AutoMerge should evaluate.
Step 2: Start Dry Run
The Start Dry run button becomes available once a repository has sent its first event. If it is disabled, open or update a pull request in one of the connected repositories.
-
Click Start Dry run. The Start AutoMerge in Dry run dialog opens.
-
Under Repositories, select the repositories to evaluate. Every repository that is Off is selected by default. Repositories that are already running keep their mode and are not listed.
-
Under When should it run?, choose a trigger:
- On every pull request update (recommended): Runs after CI checks complete on each push, so the score includes the CI result.
- Only when asked (Manual): Nothing runs until someone starts an evaluation on a pull request.
GitLab repositories always start with Manual. AutoMerge comments on each merge request with a Run evaluation link.
-
Click Continue.
-
In Basic rules, choose the criteria Dry run scores. All three default criteria are checked, weighted 34%, 33%, and 33%, and Dry run would approve when they score 75 or more. Unchecking a criterion drops it and spreads its weight over the others. Keep at least one checked.
-
Click Start Dry run, then Done.
Dry run skips two kinds of repositories and lists them in the result:
- Already running: A repository that is not Off keeps its current mode.
- Path rules that approve or merge: A repository with an Auto-approve or Auto-merge path rule would act under Dry run too. Start it from its Configuration tab instead.
You can change every choice from the dialog later, per repository, in Configure a Repository.
Step 3: Verify the First Evaluation
- Open or update a pull request in a repository running Dry run.
- With the automatic trigger, wait for its CI checks to finish. With the manual trigger, use the Run evaluation link in the bot's comment on the pull request.
- On GitHub or GitLab, check that the pull request or merge request shows a comment with the score card and a Darkplane auto-approval check or commit status.
- In Dash0, open the repository from the Repositories tab, then the Pull requests tab. The pull request shows a Decision and a Soft score.
If no decision appears, see Troubleshoot AutoMerge.
IP allowlists
If you use an IP allowlist to restrict access to your version control provider, allow these addresses:
- The Dash0 regional egress IPs and Sandbox egress IPs for your Dash0 region.
- The global control plane egress IPs, listed under
aws.us-east-2in the Dash0 regional egress IPs.
Further Reading
- About AutoMerge: What AutoMerge does and how it decides.
- Configure a Repository: Mode, trigger, threshold, criteria, and path rules.
- Operate AutoMerge: Review decisions, leave feedback, and change modes.
- Roll Out AutoMerge: Move from Dry run to Auto-approve with evidence.
- Set Up GitLab Integration: Connect your GitLab groups.
Last updated: