Skip to content

Common tools to work with bunch of Gerrit repositories, with help of REST API and Command Line Tools

Notifications You must be signed in to change notification settings

smotyrev/gerrit_tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gerrit_tools

Common tools to work with a bunch of Gerrit repositories, with help of REST API and Command Line Tools

Install

Python 3.5 required

pip install gerrit-tools

Setup

On first run script will prompt to input several params related to your Gerrit instance. Configuration is stored in ~/.config/gerrit_tools/config file.

$ gerrit_tools ...some command...
Enter value for GERRIT_URL: gerrit.yourserver.org
Enter value for GERRIT_PORT: 29418
Enter value for GERRIT_USER: [email protected]
Enter value for GERRIT_API_TOKEN: <TOKEN>

<TOKEN> is generated here: [Gerrit -> Settings -> HTTP Credentials]

Usage

Example deleting some/temp/branch on all repositories:

$ gerrit_tools branch delete some/temp/branch

Example copying src/branch to new dst/branch on all repositories:

$ gerrit_tools branch copy src/branch dst/branch

Upload new repo branches from local repo to gerrit. Local repos can be filtered by xml tag and by "remote" attribute. Option --create can be used to try to create remote repository, if absent, before push.

$ gerrit_tools repo upload <new_branc_name>

About

Common tools to work with bunch of Gerrit repositories, with help of REST API and Command Line Tools

Resources

Stars

Watchers

Forks

Packages

No packages published