Engineering

Backport a fix to a release branch

Mention Merlin on a merged pull request and name a release branch. It cherry-picks the fix, runs the tests and opens the backport pull request.

@Merlin from now on, when someone asks you to backport a merged pull request in this repository, cherry-pick its commits onto the release branch they name and run the tests. Open a backport pull request into that branch and link it in your reply. If the cherry-pick conflicts or the tests fail, explain what broke in your reply instead of guessing a fix.

acme/web · pull requests
Get started for free
  1. Starts whenSomeone mentions @usemerlin-ai on a merged pull request and names the release branch
  2. Merlin worksClaude Code or Codex cherry-picks the fix onto that branch and runs the tests on a teammate's machine
  3. You getA backport pull request into the release branch, linked in a reply on the original

Tools

  • GitHub

Capabilities

  • Integrations

How it works

From a merged fix to a backport pull request.

Mention @usemerlin-ai on the merged pull request and name the release branch that needs the fix.

acme/web

Type/to searchS
CodeIssues8Pull requests12AgentsActionsProjectsSecurityInsightsSettings

Fix double charge when a card retry succeeds#612Code

Mergedsammerged 2 commits intomainfromfix/retry-double-charge

Conversation 5 Commits 2 Checks 3 Files changed 3+48−6

samcommented yesterdayAuthor

Stops the billing worker from charging again when Stripe reports a retried payment as succeeded.

Before and after

Fixes reach the release branch without a second round of work.

Without Merlin

Someone redoes the fix on the release branch by hand, often days after it merged.

  1. 01Find the merged commits
  2. 02Fetch the release branch
  3. 03Create a backport branch
  4. 04Cherry-pick each commit
  5. 05Resolve the conflicts
  6. 06Install the branch's dependencies
  7. 07Run the tests
  8. 08Push the branch
  9. 09Open a pull request into the release
  10. 10Link it on the original

With Merlin

One mention on the merged pull request gets the backport opened and tested.

  1. @usemerlin-ai on the merged pull requestWith the release branch named
  2. Cherry-picks and tests on Jo's MacBookClaude Code on the release branch
  3. Backport pull request openedLinked in a reply, or what broke

Setup

Connect GitHub once, then ask for a backport on any merged pull request.

Set these up once and anyone can ask for a backport from the merged pull request.

  1. 01Connect a machineRuntimeInstall the Merlin desktop app or CLI on a computer running Claude Code or Codex. You can also use a machine a teammate shares with your workspace.
  2. 02Install the GitHub appIntegrationsPick the repositories Merlin can access. It sees mentions, reads the pull request and replies in the thread. Pushes use the machine owner's own Git access.
  3. 03Keep release branches buildableRuntime

    Older release branches can expect an older toolchain. Make sure the machine that runs the backport can install and test them, for example with the Node version each branch pins.

  4. 04Paste the setup promptGuidanceAn owner or admin sends the prompt below to @Merlin once, and it becomes workspace guidance for every future run.

Prompt

Tell Merlin how to handle a backport request.

@Merlin from now on, when someone asks you to backport a merged pull request in this repository, cherry-pick its commits onto the release branch they name and run the tests. Open a backport pull request into that branch and link it in your reply. If the cherry-pick conflicts or the tests fail, explain what broke in your reply instead of guessing a fix.

acme/web · pull requests

Once, when you paste it

  1. PromptYou paste the prompt to @Merlin
  2. GuidanceMerlin saves your rules as workspace guidance

Every time someone mentions Merlin on GitHub

  1. IntegrationThe GitHub app spots the mention
  2. RuntimeMerlin picks an available machine
  3. ContextThe run gathers context
  4. WorkClaude Code or Codex cherry-picks the fix and runs the tests
  5. SteeringYour team steers the work in the thread
  6. ResultMerlin links the backport pull request

Bring your coding agents into the tools your team already uses.

Let your whole team hand work to Claude Code and Codex today. Connect one machine and add Merlin to Slack, Linear or GitHub. 14-day free trial, no API keys, no card.