# General Translation Platform: Auto-merging Locadex PRs
URL: https://generaltranslation.com/en-US/docs/platform/locadex/guides/auto-merging-prs.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: How to configure Locadex to merge pull requests automatically when checks pass.

Auto-merge eliminates manual PR review for Locadex-generated pull requests. When enabled, PRs created by Locadex merge automatically after checks pass.

Auto-merge is available on each automation detail page. It is off by default for new automations.

## Set up auto-merge [#set-up-auto]

Open **Project > Automations** and choose the automation you want to configure:

- **Generate code** for code internationalization
- **Generate translations and push** for content updates
- **Keep locales in sync** for locale updates

Turn on **Auto-merge**, then save the automation. Read more in [Configuring Locadex automations](/docs/platform/locadex/guides/configuring-automations).

## Configure GitHub permissions [#configure-github-permissions]

If your default branch has protection rules, Locadex will continue creating PRs but cannot merge them automatically. Configure GitHub to allow Locadex to bypass branch protection:

1. **Open repository rulesets**: in your GitHub repository settings, select **Rulesets** from the Rules section.
2. **Identify blocking rules**: find rules preventing automatic merges. Multiple rules may need updating. Common blockers include: **"require a pull request before merging,"** required status checks, and required review approvals.
3. **Add bypass permissions**: select the rule blocking auto-merge, then **"Add Bypass"** and select **Locadex Agent** from the dropdown.
4. **Save changes**: make sure to click **Save** at the bottom of the page to apply your changes (this step is easy to miss!)



## Preserve manual edits [#preserve-manual-edits]

Turn on **Preserve local edits** if manual translation edits should be preserved before Locadex runs.

This is useful when your team reviews or edits generated translations in the Dashboard.

## Add validation commands [#add-validation-commands]

If Locadex should run a build, lint, or test command before creating or updating the pull request, add a **post-process command**. (Pre-process commands run before Locadex processes files, post-process commands run after Locadex processes files).

For example:

```bash
npm run lint
```

Commands run from the repository root. For monorepos, set the automation's **Target directory** so Locadex knows where the app lives.

## When not to use auto-merge [#not-use-auto]

Keep auto-merge off when:

- You want every Locadex pull request reviewed by a person.
- Generated changes need product or legal review.
- Your repository does not have reliable required checks.
- You are still testing Locadex setup.

*Note: auto-merge does not apply to PRs for Setup or Re-run Setup.*

## Next steps

- /docs/platform/locadex/guides/configuring-automations
- /docs/platform/locadex/guides/viewing-automation-activity
- /docs/platform/locadex/guides/managing-languages
- /docs/platform/locadex/guides/using-in-monorepos

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
