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" --gerrit-action="delete-reviewer:account-id,..." --gerrit-query="since:2021-01-01 until:2021-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" --gerrit-action="delete-reviewer:account-id,..." --gerrit-query="since:2021-01-01 until:2021-01-02"

Usage

usage: action.py [-h] --config-file CONFIG_FILE --gerrit-action GERRIT_ACTION --gerrit-query GERRIT_QUERY [-v]

Gerrit Action

optional arguments:
  -h, --help            show this help message and exit
  --config-file CONFIG_FILE
                        config file (.yml)
  --gerrit-action GERRIT_ACTION
                        gerrit action (add-reviewer:account-id,... delete-reviewer:account-id,... add-attention:account-id,... remove-attention:account-id,... approve-change:Code-Review=+2,... submit-change)
  --gerrit-query GERRIT_QUERY
                        gerrit query (status:open since:2021-01-01 until:2021-01-02)
  -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
    query:
      option:
        - CURRENT_REVISION

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.2.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

gerritaction-1.2.0-py2.py3-none-any.whl (13.4 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: gerritaction-1.2.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for gerritaction-1.2.0.tar.gz
Algorithm Hash digest
SHA256 30dec8efdb9c7baef41ce5ec3e5a573353660451579818525b8f8b5109569824
MD5 7f0ab46ad9b47dec6e95b8c0f7fe8662
BLAKE2b-256 d4d26c130e76f3c1f476fb95f10662459ef18998f89304da039bbe56f30cf504

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gerritaction-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 51b8ca91c368e77f8f82731548e9c3e8f7a86e7cddadb1c490a016e45598cc54
MD5 7c98c393280fe6449fa385dd0cf13e61
BLAKE2b-256 19491e9fe64cfb55aef493a06684bd817c28c5b7d9f2a531ffbe08cbc11e87c3

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