Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Transfer pull requests to Gerrit

Project description

This is a script Mike is working on to transfer pull requests from github and bitbucket into gerrit.


You need a running instance of Gerrit available, and also you must have the git-review tool installed locally.


pip install prtogerrit


Create a new file ${HOME}/.prtogerrit.config. In it, place instructions as to where your git repositories are, and into what part of your gerrit server you’d like them to go:

# place this file in $HOME/.prtogerrit.config



Running it

To use the script, suppose you receive pull request number 14 on “myproject” at Github. Go to your git working directory, select the desired branch (usually master), and type:

prtogerrit myproject_github 14

If the pull request merges cleanly, that’s it! The script will contact the Github API, get the branch information for pull request 14, squash-merge it into a new local branch called “myproject_github_14”, and will then push it up with “git review”. It will also close the pull request and add comments for the contributor how to find the review.


If the squash-merge has conflicts, prtogerrit will stop and let you correct the changes, by using “git add <filename>” just like any other merge resolution. Then run the command again with --continue:

prtogerrit myproject_github 14 --continue

Project details

Release history Release notifications

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for prtogerrit, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size prtogerrit-1.0.tar.gz (5.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page