Mergebots (beta)

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:

For information on how to set up a mergebot, refer to Create a mergebot. For a full tutorial on how to create a Trunk bot, refer to the Create a mergebot Unity Learn tutorial.

Note: In beta, you can create and use only one mergebot.

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. [what format?]

Types of mergebot

Mergebot typeDescription
Trunk botA 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 botA 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 parameterDefault valueDescription
Status attributestatusThe name of the attribute that the mergebot detects to process a branch.
Resolved valueresolvedThe mergebot processes branches with this attribute value.
Failed valuefailedWhen a merge fails, the mergebot sets the status attribute to failed.
Merged valuemergedWhen a merge completes, the mergebot sets the status attribute to merged.
Testing valuetestingA test value for the status attribute.

Trunk bot options

The following configuration options are only available for a trunk bot.

FieldDescription
Only process reviewed branchesThis option ensures that the mergebot only merges reviewed branches.
Re-enqueue branches that failed due to detected changes in the destination branchThis option ensures that when the destination branch has new changes, the mergebot re-queues a merge to include the new changes.
Label merged changesetThis 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, LABEL.${AUTO_INCREMENT_NUMBER}_${BUILD_DATE_FORMATTED, yyyy-MM-dd} adds a label in this format: LABEL.128.2018-10-23.

Advanced settings

CI integration

You can set up Continuous Integration (CI integration) so that your trunk mergebot triggers a build when it merges changes. The mergebot integrates with Jenkins, Bamboo, and Team City.

To set up a CI integration, you need the base URL of your system server, and your username and password to connect to the platform system.

Note: CI integration is only available for trunk bots.

Notifier integration

You can add a Notifier integration to both conflict and trunk mergebots so that the mergebot can send users status notifications. You can send notifications through either Slack or email.

To use Slack, you need your Slack Token to connect to the Slack API. To use Email, you need the sender email address and password. You also server URL and port of the SMTP server that you want to use to send the emails.