Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.35 KB

File metadata and controls

41 lines (29 loc) · 1.35 KB

Agent Guidelines — Auto Merge Bot

This file provides context for AI agents operating on this canvas.

What this app does

Automatically merges pull requests when all CI checks pass and a specific label is applied. Two entry points: CI status changes and PR labeling events.

Flows

CI status/check run changes

onCommitStatus or onCheckRun → getCombinedCommitStatus → All statuses green?
  → (yes) listCheckRunsForRef → All check runs passed?
    → (yes) Has PR? → Get PR Details → Has merge label?
      → (yes) Merge PR

PR labeled

onPullRequest (labeled) → Label is merge-when-ready? → getCombinedCommitStatus → (same flow as above)

Install parameters

Parameter Default Where it's used
repository All GitHub nodes
merge_method squash Merge PR node
label merge-when-ready Label filter and If condition

What's safe to change

  • Merge method — squash, merge, or rebase
  • Label name — any GitHub label
  • Add notifications — wire a Slack/Discord node after the Merge PR node

What not to change

  • The dual entry point pattern — both CI events and label events need to flow through the same check sequence
  • The check order — commit statuses first, then check runs, then PR details, then label check