Skip to main content
Autofix is a built-in Upsun Dispatch workflow that works on the open items of a merge request or pull request: unresolved threads, review comments, failed CI jobs, and merge conflicts. It runs on GitLab merge requests, GitHub pull requests, and Bitbucket pull requests. Autofix is off until someone turns it on. You can turn it on for one merge request or pull request, or set Issue to code to open its merge requests and pull requests with Autofix already on.

How Autofix works

Autofix works in rounds. Each round pushes one commit to the branch, or adds a reply that tells why it did not. Autofix replies in each thread it works on, so you can see what happened to your comment:
  • Fixed. The reply starts with Fixed in and the commit, then says what the change does.
  • A question first. The reply starts with A question before changing the code:. Autofix asks before a change it judges big, a change that reaches past what the comment names, or a change a reviewer would want to agree to first. It also asks when it can’t tell what the comment wants. The question says what Autofix would do. Autofix makes no change for that thread until someone who can push answers.
  • Answered. The reply starts with Answered without changing the code. Autofix uses it when the comment is a question, or when the code already does what the comment asks for.
  • Not fixed. The reply starts with Couldn't fix this., Left as is., or Change not pushed., then gives the reason.
Autofix does not resolve threads. A person resolves them. When Autofix is on, a new round starts when:
  • someone who can push to the repository adds a comment,
  • a Upsun Dispatch review completes, or
  • another merge request or pull request merges into the target branch and causes a conflict.
A push does not start a round. A failed pipeline does not start a round either. Autofix reads the failed jobs when a round starts for a different reason, for example a new comment or a completed review. Autofix fixes a conflict with a merge commit. It does not rebase the branch. After you turn Autofix on, it makes up to 10 rounds that nobody asked for. After that, it posts a note and waits. To continue, ask for one more round or turn Autofix on again.

Turn on Autofix for one merge request or pull request

Use one of these methods:
  • Add a comment. Write @upsun-dispatch autofix. To give instructions, add them after a colon, for example @upsun-dispatch autofix: keep the retry limit. Start the comment with the mention.
  • Add the label. Add the Dispatch Autofix label. This method is available on GitLab and GitHub only. Upsun Dispatch creates the label the first time it turns on Autofix in a project or repository. To add the label before then, create it on the Labels page.
  • Use the Upsun Dispatch console. On the run page of a Code review or Issue to code run, select the Enable Autofix checkbox in the header. Only an organization owner or admin can change this checkbox.
On GitLab, you can also mention the bot username configured for your GitLab connection, for example @<configured-bot-username> autofix. This applies to every Autofix command on this page. Autofix commands can carry instructions, as in the example above. This is different from Code review commands such as @upsun-dispatch review, which must be the whole comment. Upsun Dispatch confirms the change: While Autofix is on, the run page in the Upsun Dispatch console shows the Autofix on badge. Turning Autofix on starts the first round right away. If there is nothing to fix yet, Autofix says so in a note and waits for the next comment or review. To skip this step for the merge requests and pull requests that Issue to code opens, see Turn on Autofix for new merge requests and pull requests.

Turn on Autofix for new merge requests and pull requests

Upsun Dispatch can turn Autofix on automatically for the merge requests and pull requests that Issue to code opens. This works for GitLab, GitHub, and Bitbucket.
  1. In the Upsun Dispatch console, go to Workflows > Issue to code.
  2. Turn on Autofix for new merge requests. The label can also read Autofix for new pull requests or Autofix for new merge and pull requests.
The setting is off at the organization level by default. A repository can set it on or off in Repository overrides. When the setting is on:
  • GitLab: Issue to code opens the merge request with the Dispatch Autofix label, and the first Autofix round starts right away.
  • GitHub: Issue to code opens the pull request, posts Autofix is on for this pull request., and adds the Dispatch Autofix label. The first round starts on the next trigger, usually when the Upsun Dispatch review completes.
  • Bitbucket: Issue to code opens the pull request and posts Autofix is on for this pull request. The first round starts on the next trigger, usually when the Upsun Dispatch review completes.
This setting applies only to merge requests and pull requests that Issue to code opens. For a merge request or pull request that a person opens, turn on Autofix yourself. For broader workflow settings context, see Workflows in Upsun Dispatch.

Run one round only

Write @upsun-dispatch update or @upsun-dispatch fix. Autofix does one round and does not stay on. To give instructions, add them after the command, for example @upsun-dispatch fix the failing lint job. If Autofix is already on, it stays on after the round. To stop a round that is running, write @upsun-dispatch cancel. Autofix stays on. The same comment also stops a Code review that is running on the merge request or pull request.

Turn off Autofix

Use one of these methods:
  • Write @upsun-dispatch autofix off.
  • Remove the Dispatch Autofix label. This method is available on GitLab and GitHub only.
  • In the Upsun Dispatch console, clear the Enable Autofix checkbox on the run page.
Upsun Dispatch posts Autofix is off for this merge request. or Autofix is off for this pull request. Autofix also turns off when you close or merge the merge request or pull request. If you open it again, Autofix stays off.

Permissions

In the Upsun Dispatch console, only an organization owner or admin can use the Enable Autofix checkbox.

Whose comments Autofix reads

Autofix reads only comments from people who can push to the repository: the Developer role or higher on GitLab, and write access on GitHub and Bitbucket. It also reads the findings of a Upsun Dispatch review. A comment from someone who can’t push does not start a round, and Autofix does not act on it. When that person asks for a change in a thread, Autofix replies once to say so. Anyone who can push can then ask for the change.

Comments from other bots

Autofix treats another bot, such as a second review bot, like any other author. By default it does not read the bot’s comments. GitHub. Trust the bot on the repository:
  1. In the Upsun Dispatch console, open the repository and go to Trusted bots.
  2. Find the bot in the list. A bot shows there after it has commented on one of the repository’s pull requests. The list shows each bot’s name, when it was last seen, and whether it is Trusted or Not trusted.
  3. Select Trust, then confirm with Trust bot.
To stop reading a bot’s comments, select Stop trusting. Only organization owners and admins can change which bots are trusted. The list applies to that repository only, and Code review uses the same list.
A bot may repeat text from anyone, such as an issue or a comment it quotes. Trust only bots you know.
GitLab and Bitbucket. Autofix reads a bot’s comments when the bot’s account can push to the repository. Give the bot’s account the Developer role or higher on the GitLab project, or write access to the Bitbucket repository.

Keep descriptions current

In the Upsun Dispatch console, go to Workflows > Autofix to manage description updates. The organization-level switch is Description updates. It is on by default, and repositories can override it. When Description updates is on, after Autofix pushes a change, it corrects sentences in the merge request or pull request description that the change made wrong. An empty description stays empty. When Description updates is off, Autofix leaves the description unchanged. For the full list of built-in workflows, see Built-in workflows. For workflow-level context, see Workflows in Upsun Dispatch.
Last modified on December 4, 2026