Mergebots
Create a mergebot to automate merges and tasks in your repository.
Read time 2 minutesLast updated 21 days ago
A mergebot is a tool that you can use to automate parts of your merge process. Mergebots check that a merge request meets specified conditions before it merges into your destination branch. This automation can help you can work faster and reduce room for errors. For example, you can set up a mergebot to automate the following tasks:
- Check merge request review statuses and merge conflicts.
- Use individual status parameter attributes and values to trigger a merge request automatically.
- Re-queue merge requests that fail due new changes in the destination branch.
- Notify team members of successful merges and trigger external tools.
Mergebot configuration
Branch configuration
The Destination branch that you select is the branch that a trunk bot merges task branches into, and the branch that a conflicts bot checks for merge conflicts. The destination branch is usually your main branch. You can enter a specific Branch prefix to further filter the branches that your mergebot processes.Types of mergebot
Mergebot type | Description |
|---|---|
| Trunk bot | A trunk bot automatically merges task branches into your destination branch. You can further configure your trunk bot behavior and which branches the trunk bot processes. You can also set up an integration to automatically trigger builds. |
| Conflicts bot | A conflicts bot automatically detects merge conflicts on task branches before you merge your changes. |
Status parameters
Mergebots use a branch's status attribute to detect which branches the mergebot should process. You can edit the attribute name according to your workflow.Status parameter | Default value | Description |
|---|---|---|
| Status attribute | | The name of the attribute that the mergebot detects to process a branch. |
| Resolved value | | The mergebot processes branches with this attribute value. |
| Failed value | | When a merge fails, the mergebot sets the status attribute to |
| Merged value | | When a merge completes, the mergebot sets the status attribute to |
| Testing value | | A test value for the status attribute. |
Trunk bot options
The following configuration options are only available for a trunk bot.Field | Description |
|---|---|
| Only process reviewed branches | This option ensures that the mergebot only merges reviewed branches. |
| Re-enqueue branches that failed due to detected changes in the destination branch | This option ensures that when the destination branch has new changes, the mergebot re-queues a merge to include the new changes. |
| Label merged changeset | This option ensures that the mergebot labels all merged changesets. You can then enter a Label pattern to define what label the mergebot adds. For example, |