Project

hubmerge

0.0
No commit activity in last 3 years
No release in over 3 years
A gem to merge multiple GitHub PRs that match a search query
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 5.0
~> 10.0

Runtime

~> 4.0
~> 0.18
 Project Readme

HubMerge

HubMerge helps you merge multiple GitHub Pull Requests with a friendly TUI.

Installation

gem install hubmerge

To authenticate with GitHub, HubMerge expects a GITHUB_TOKEN environment variable to be set. Visit Github > Settings > Personal Access Tokens to create one. If this is not set, HubMerge will prompt for the value.

Usage

HubMerge accepts parameters interactively. Just run hubmerge to get started.

$ hubmerge

You can provide parameters via the CLI too (good to store in your shell history if you do this often!)

$ hubmerge --repo "rails/rails" --query "author:app/dependabot"

By default, hubmerge will always ask for confirmation before merging PRs. If you want to avoid this, use the --yes flag. This is useful if you're running hubmerge as part of a script.

Advanced Usage

HubMerge's primary use case is to merge PRs in a single repository. To support advanced use cases, HubMerge allows using any arbitrary Github search filter.

When the --repo flag is omitted, the query is directly passed in as a search filter (prefixed with is:pr is:open). One can now embed repo/org/user filters into the search query itself.

Note: This isn't supported in interactive mode, only via the CLI.

Multiple repositories

To merge PRs across multiple repositories:

$ hubmerge --query "repo:rails/rails repo:sinatra/sinatra author:app/dependabot"

Organization wide merges

To merge PRs across an entire org:

$ hubmerge --query "org:rails author:app/dependabot"

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/rohitpaulk/hubmerge.

License

The gem is available as open source under the terms of the MIT License.