PR management for GitHub repos. merge-bot automates pull request integration by checking a configurable set of conditions before merging: required labels, blocking labels, and optional reviewer approval. Once conditions are met, the PR is merged with the method of your choice and the branch is cleaned up.

It’s designed to replace the manual label-watching and back-and-forth of “is this ready?” — wire it up, set your rules, and let the bot handle the rest.

Setup

Add a workflow file at .github/workflows/merge-bot.yml:

name: Merge Bot
on:
  pull_request:
    types: [labeled, unlabeled, review_requested, review_request_removed]
  pull_request_review:
jobs:
  merge:
    runs-on: ubuntu-latest
    steps:
    - uses: squalrus/merge-bot@v1
      with:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        labels: ready
        blocking_labels: do not merge
        method: squash

Options

OptionDefaultDescription
labelsreadyLabel(s) required before merging
blocking_labelsdo not mergeLabel(s) that block the merge
reviewerstrueRequire all reviewers to approve
methodmergeMerge method: merge, squash, or rebase
testfalseTest mode — comments instead of merging
delete_source_branchfalseDelete branch after merge