Lingtai
Docs
GitHub

Documentation

merge:

DoesLands the branch on the base: merge the branch into the base inside a throwaway worktree, push.
Write it atmerge — the last action there.
NeedsNothing beyond name. merge.strategy defaults to merge-commit, the only value.
RefusesAny other strategy, a base: of its own, any step but merge.
Watch outIt reports and does not decide: a refused landing goes to proposed, where a round is bought. A hold written after it asks about a merge already made.

Puts a change on the base exactly once, after every other step has passed — so what lands is the thing the review was of, and a failed landing is a report carrying its own reason rather than a half-merged main.

What it does#

createMergeAction in packages/actions/src/merge-action.ts drives integrate (packages/repo/src/integrate.ts): cut a throwaway detached worktree at the base, merge the branch into it with git merge --no-edit, re-verify the result, then push — a fast-forward where it can be one. Declaring nothing at merge runs the same action off the same base.

A refusal carries the lane's own reason (conflict, verify-failed, …) and detail to proposed. strategy has one value, merge-commit.

Where it may be declared#

mergePlugin.at is { merge }: it is the last step before end and the only one that changes the base, so the lane is read there and a pass lands once. It is the last action in that list — anything written after it is refused, because a check that fails there fails about a change already on main. A person-asking action at merge is refused too: hold at proposed, or run with --no-merge.

Parameters#

fieldtyperequiredwhat it means
namestringyesHow every verdict addresses this action.
merge.strategymerge-commitno, merge-commitHow the branch goes in. The enum is the code's: it grows when the code does.

There is no base:. base is written on worktree: (or repo.base) and handed to the lane, so what a pass cut and what it lands cannot disagree.

Examples#

# packages/recipe/unit/edit-mechanism.test.ts — the landing written out
merge:
  - name: land the branch
    merge:
      strategy: merge-commit
# the default spelled out: `strategy` may be left off
merge:
  - name: land
    merge:
      {}
# a repository that wants a person to approve first: the hold is at `proposed`, before the lane
proposed:
  - name: approve the merge
    human: "Land this change on main?"
merge:
  - name: land
    merge:
      {}

The first two differ in nothing but spelling, on purpose — leaving the key out is the third spelling. The last is the one that decides something.

What it refuses#

merge:
  - name: land
    merge:
      strategy: squash

steps.merge.0.merge.strategy: … its "merge" field is not what "merge" accepts: Invalid input: expected "merge-commit".

Written at proposed: merge: does not implement proposed — it serves merge: merge is the last step before end and the only one that changes the base … a lane declared earlier on the spine would put a change on main while the steps after it were still deciding about it. All when the recipe resolves — before a worktree, before an agent, before any money.

Rendered from doc/plugins/merge.md at build time. The file is the document; this page is a projection of it, and never a copy — which is why the fix for anything wrong on it is a pull request against that file.