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.4.tar.gz
.
File metadata
- Download URL: gitgerrit-0.0.4.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 | 070625c419a912fe1825ce53236e101e53d55e834422903424cc48101d489269 |
|
MD5 | ed328d7d8f11d282a24bb7f335a2641d |
|
BLAKE2b-256 | be2261c6302cf5ec692ab8fc1c2c66f92c2d0918abde0d824265b177df390419 |