command module
v1.2.0 Latest Latest

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 17 Imported by: 0



Merge your GitHub pull requests from the command line.

Build Status


Merging pull requests in the browser is nice, sure, but you lose a lot of clarity into what changed & when at a higher level. When did you add that feature? Oh, you're releasing a new patch? What changes did you make? No, I won't read through your commit history.

This tool aims to make it easy to merge PR's and add a line to the CHANGELOG (History.markdown by default). All with one command.

Here's more on why you should keep a changelog.


You need Go and you need your $GOPATH set & $GOPATH/bin in your $PATH. Then:

$ go get

Throw your credentials in $HOME/.netrc, like this:

  login yourusername
  password mypersonalaccesstokenforgithub

Grab a personal access token on the GitHub Applications Setting page.


$ cd my-project
$ merge-pr 7

It uses the origin remote to discern which repo to make the API requests against, so ensure your origin is pointed to the repository that you want to merge the pull request into.

This will go to GitHub, merge the PR, delete the branch if it's on the same repo, will pull down those changes, open up your editor ($EDITOR), then commit that change.


To get setup, clone the repo and run script/bootstrap. Make your edits. Add tests where you can. Run tests with script/test, use script/cibuild to run the tests and build the binary if the tests are successful.

Once you're happy with your change, submit a PR. If I like it, I'll use this tool to merge it!


We adhere to SemVer where applicable. To see the version of your copy of merge-pr, run merge-pr -V.

To release a new version, change the version in main.go, and run script/release.

Credits / License

MIT License, copyright Parker Moore. Details in the LICENSE file.


The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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