Command line tool to interact with gerrit change requests
Project description
git-gerrit
Command line to to interact with gerrit and its ci integrations.. Made for internal use but could be useful for others too.
Installation
pip install gitgerrit
After the package has been installed, its available via git gerrit
.
Usage
At this time, git gerrit has 3 sub commands. runverify
topic
& abandon
Each of these subcommands operate at the current git branch's head commit unless you pass --commit N
or --changeid N
flags.
If also pass --support-chain
flag, all operations are targetting whole commit chains that.
you can also specify logging level via --loglevel=$level flag.
Configuration
You must provide following settings in your local or global git configuration:
[gerrit]
token = $gerrit_restapi_token
user = $gerrit_username
host = $gerrit_hostname
Or, you can set corresponding environment variables: GERRIT_TOKEN, GERRIT_USER, GERRIT_HOST
runverify
git gerrit runverify
will add a comment to latest revision of current comment if it ha been published into gerrit.
If you want to add the commit to some other change, you can use --changeid
or --commit
If you want to to check the state votes of the change request, append --check
flag to runverify
abandon
git gerrit abandon
will abandon current change request if its already in gerrit. If you have been working on a commit chain and
you would like to abandon it as whole: git gerrit --support-chain abandon
topic
git gerrit topic --check
will show all the commits/changes in gerrit in your current commit chain.
If you wish to set a topic to a single commit:
git gerrit topic --set newtopic
Default value for topic is always "noci".
git gerrit --support-chain topic
will set topic of all changes in your commit chain except the HEAD into "noci". Same command
could be also written as git gerrit --support-chain topic --set noci
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file gitgerrit-0.0.3.tar.gz
.
File metadata
- Download URL: gitgerrit-0.0.3.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d32dd36176d73f29d7cb0f441d5d3cc068748b271f3cdffedac1333cabab99f |
|
MD5 | a61a785e55f411d1e6ac2b89d4e95b04 |
|
BLAKE2b-256 | 1c4a5aaf917c8d1482b4f1bd5b7e33b265cd520c3f372933357fb46b240c42ef |