Skip to main content

Gerrit Action

Project description

gerritaction

Actions Status License PyPI Tag

Introduction

gerritaction is a tool used for Gerrit action via Gerrit API.

Prerequisites

  • Python >= 3.7.0

Run

git clone https://github.com/craftslab/gerritaction.git

cd gerritaction
pip install -Ur requirements.txt
python action.py --config-file="config.yml" --change-query="since:2024-01-01 until:2024-01-02"

Docker

git clone https://github.com/craftslab/gerritaction.git

cd gerritaction
docker build --no-cache -f Dockerfile -t craftslab/gerritaction:latest .
docker run -it -v /tmp:/tmp craftslab/gerritaction:latest ./gerritaction --config-file="config.yml" --change-query="since:2024-01-01 until:2024-01-02"

Usage

usage: action.py [-h] --config-file CONFIG_FILE
                 [--account-query ACCOUNT_QUERY] [--change-query CHANGE_QUERY]
                 [--change-action CHANGE_ACTION] [--group-query GROUP_QUERY]
                 [--project-query PROJECT_QUERY] [--output-file OUTPUT_FILE]
                 [-v]

Gerrit Action

options:
  -h, --help            show this help message and exit
  --config-file CONFIG_FILE
                        config file (.yml)
  --account-query ACCOUNT_QUERY
                        account query (name:john email:example.com)
  --change-query CHANGE_QUERY
                        change query (status:open since:2024-01-01
                        until:2024-01-02)
  --change-action CHANGE_ACTION
                        change action (add-reviewer:account-id,... delete-
                        reviewer:account-id,... add-attention:account-id,...
                        remove-attention:account-id,... approve-change:Code-
                        Review=+2,... delete-change submit-change)
  --group-query GROUP_QUERY
                        group query (name:admin member:john)
  --project-query PROJECT_QUERY
                        project query (name:test state:active)
  --output-file OUTPUT_FILE
                        output file (.json)
  -v, --version         show program's version number and exit

Settings

gerritaction parameters can be set in the directory config.

An example of configuration in config.yml:

apiVersion: v1
kind: worker
metadata:
  name: gerritaction
spec:
  gerrit:
    host: http://127.0.0.1/
    port: 8080
    user: user
    pass: pass

License

Project License can be found here.

Project details


Download files

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

Source Distribution

gerritaction-1.7.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

gerritaction-1.7.0-py2.py3-none-any.whl (14.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file gerritaction-1.7.0.tar.gz.

File metadata

  • Download URL: gerritaction-1.7.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.13

File hashes

Hashes for gerritaction-1.7.0.tar.gz
Algorithm Hash digest
SHA256 4e04d99220c84dbfd4c810c7b5259e13dfd23c00cc667a14c81e872bbe4b8cf2
MD5 41557bbf443f3fa097282eea30bdca45
BLAKE2b-256 b0d189efb12d81f44db9f40fda65390e1c7162e6366e4e751926e2af7e4e6b4e

See more details on using hashes here.

File details

Details for the file gerritaction-1.7.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for gerritaction-1.7.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8849c77f5cd9654c4069fa168164be49979d3fc15792f258ecb6a4fbae65e35e
MD5 1d8e77c2f612fefe9c1fef49269c2da4
BLAKE2b-256 f988d8cc638fa8167cf4037f056c2be73ceeba0a304ccc7cfcee2239a6b36d3d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page