Skip to main content

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.

Release files for gerritaction 1.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gerritaction 1.11.0
File Size Uploaded
gerritaction-1.11.0.tar.gz 13.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gerritaction 1.11.0
File Interpreter ABI Platform
gerritaction-1.11.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 28.7 kB

Release files / gerritaction-1.11.0.tar.gz

Download URL gerritaction-1.11.0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
361ed27e2ab2606a93aea5dab301799ec87472da4e0593b8f887b131eeddc040
BLAKE2b-256 checksum
How to use checksums
a539ad7184da468d9bba08fdf10f44184a37bc37fa8a3ea576ab4f261bb6c2aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / gerritaction-1.11.0-py2.py3-none-any.whl

Download URL gerritaction-1.11.0-py2.py3-none-any.whl
Size 15.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b3469f58b9c9f9b6cb928bd96fdb13333f42007a32dd9ad6fc8c6ab46c9c0105
BLAKE2b-256 checksum
How to use checksums
191b33f9418aad3993fec1a0ebd561a8ef1c6e3c1d55071e1bf8fad1bd3b5646
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.11.0 This release

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page