ghprmerge

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 11 Imported by: 0

README

GitHub release License Active Go Report Card

ghprmerge

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

# Check version
ghprmerge --version

# Analyze what would be merged (default mode)
ghprmerge --org myorg --source-branch dependabot/

# Rebase out-of-date branches
ghprmerge --org myorg --source-branch dependabot/ --rebase

# Merge ready PRs (that are already up-to-date)
ghprmerge --org myorg --source-branch dependabot/ --merge

# PRs with no checks configured are allowed; pending checks still block merging

# Merge PRs even if behind (skip rebase requirement)
ghprmerge --org myorg --source-branch dependabot/ --merge --skip-rebase

# Use --confirm to review pending actions before taking action
ghprmerge --org myorg --source-branch dependabot/ --rebase --confirm

# Stream all repo results as they are scanned
ghprmerge --org myorg --source-branch dependabot/ --verbose

# Disable colored output
ghprmerge --org myorg --source-branch dependabot/ --no-color

# Report mode: group open PRs by source branch
ghprmerge --org myorg --report

# Report with prefix filter and JSON output
ghprmerge --org myorg --report --source-branch-prefix dependabot/ --json

# Report with minimum group size
ghprmerge --org myorg --report --min-group-size 3

Documentation

License

MIT License - see LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
config
Package config handles configuration and command line argument parsing for ghprmerge.
Package config handles configuration and command line argument parsing for ghprmerge.
github
Package github provides interfaces and implementations for interacting with GitHub API.
Package github provides interfaces and implementations for interacting with GitHub API.
merger
Package merger implements the core logic for discovering, evaluating, and merging pull requests.
Package merger implements the core logic for discovering, evaluating, and merging pull requests.
output
Package output handles formatting and displaying results.
Package output handles formatting and displaying results.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL