A command-line tool to automatically evaluate, merge, and optionally rebase GitHub pull requests sharing the same source branch across an organization.
Use case: merging automated dependency update pull requests (e.g., Dependabot) without requiring clicking through each repository individually.
Quick Start
# Set your GitHub token
export GITHUB_TOKEN=ghp_xxxxxxxxxxxx
# Optionally set the org as an environment variable (or use --org flag)
export GITHUB_ORG=myorg
# Check version
ghprmerge --version
# Show help with subcommand descriptions
ghprmerge --help
# Rebase out-of-date branches
ghprmerge --org myorg rebase --source-branch dependabot/
# Merge ready PRs (that are already up-to-date)
ghprmerge --org myorg merge --source-branch dependabot/
# PRs with no checks configured are allowed; pending checks still block merging
# Merge PRs even if behind (skip rebase requirement)
ghprmerge --org myorg merge --source-branch dependabot/ --skip-rebase
# Match multiple source branches
ghprmerge --org myorg merge --source-branch dependabot/ --source-branch feature/
# Use --confirm to review pending actions before taking action
ghprmerge --org myorg rebase --source-branch dependabot/ --confirm
# Stream all repo results as they are scanned
ghprmerge --org myorg --verbose merge --source-branch dependabot/
# Disable colored output
ghprmerge --org myorg --no-color merge --source-branch dependabot/
# Report mode: group open PRs by source branch
ghprmerge --org myorg report
# Report with prefix filter and JSON output
ghprmerge --org myorg --json report --source-branch-prefix dependabot/
# Report with minimum group size
ghprmerge --org myorg report --min-group-size 3