prtogerrit
This is a script Mike is working on to transfer pull requests from github and bitbucket into gerrit.
Requirements
You need a running instance of Gerrit available, and also you must have the git-review tool installed locally.
Installation
pip install prtogerrit
Configuration
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 [myproject_github] gerrit=https://gerrit.myproject.com/ service=github repo=myusername/myproject username=myusername password=foobar [myproject_bitbucket] gerrit=https://gerrit.myproject.com/ service=bitbucket repo=myusername/myproject username=myusername password=foobar
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.
Conflicts
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
Metadata
Release files for prtogerrit 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| prtogerrit-1.0.tar.gz | 5.0 kB | Without provenance | Details for prtogerrit-1.0.tar.gz |
Release files / prtogerrit-1.0.tar.gz
| Download URL | prtogerrit-1.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
574921da51cbd4a85cbac46b9b98b1a2b05934c1973079ae90209adaf0024b29
|
|
BLAKE2b-256 checksum How to use checksums |
345a40c335dd8cee4ca00ed0147b668d3fd9d8ebe25f722b2872d7d6d4904b2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for prtogerrit 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.