Merge Trigger

Sweeps issues labeled pr_approved (plus labeled orphan PRs) and squash-merges each linked open pull request when its merge state is clean — the canonical approval-to-merge bot, run as a pure JSRunner job without an AI CLI step.

Parameters

Configured via jobParams in the agent JSON or the project .dmtools/config.js.

  • repo — target repository as owner/name (falls back to the GH_REPO global).
  • label — approval label to sweep (default pr_approved).
  • mapPrLabels — when true, labeled PRs map back to their linked issues; a labeled PR whose issue is closed or absent merges directly (orphan-carrier path).
  • ghBranchPattern — when true, also link an issue to its PR via branch names like gh-0*NN on the issue→PR scan.
  • removePrLabel — when true, also remove the approval label from the merged PR.
  • ciRunUrl — CI run URL stamped into the merge comments.

Human doc: agents/docs/agents/merge_trigger.md

Attributes

AttributeValue
JobJSRunner
Configmerge_trigger.json
ContextId—
outputType—
skipAIProcessingfalse

Actions

LLM step

  • outputType: none

Generated by js/agentDocGenerator.js