gerritaction


Namegerritaction JSON
Version 1.3.0 PyPI version JSON
download
home_pagehttps://github.com/craftslab/gerritaction
SummaryGerrit Action
upload_time2023-08-02 02:16:41
maintainer
docs_urlNone
authorJia Jia
requires_python
licenseApache-2.0
keywords gerrit action
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # gerritaction

[![Actions Status](https://github.com/craftslab/gerritaction/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/craftslab/gerritaction/actions?query=workflow%3ACI)
[![License](https://img.shields.io/github/license/craftslab/gerritaction.svg?color=brightgreen)](https://github.com/craftslab/gerritaction/blob/master/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/gerritaction.svg?color=brightgreen)](https://pypi.org/project/gerritaction)
[![Tag](https://img.shields.io/github/tag/craftslab/gerritaction.svg?color=brightgreen)](https://github.com/craftslab/gerritaction/tags)



## Introduction

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



## Prerequisites

- Python >= 3.7.0



## Run

```bash
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

```bash
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,... delete-change 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](https://github.com/craftslab/gerritaction/blob/master/gerritaction/config).

An example of configuration in [config.yml](https://github.com/craftslab/gerritaction/blob/master/gerritaction/config/config.yml):

```yaml
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](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/craftslab/gerritaction",
    "name": "gerritaction",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "gerrit,action",
    "author": "Jia Jia",
    "author_email": "angersax@sina.com",
    "download_url": "https://files.pythonhosted.org/packages/2f/4f/96c91879a61a3472acd6f11dbfc9f68c2780038c59b0883e4bd5bb2e1240/gerritaction-1.3.0.tar.gz",
    "platform": null,
    "description": "# gerritaction\n\n[![Actions Status](https://github.com/craftslab/gerritaction/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/craftslab/gerritaction/actions?query=workflow%3ACI)\n[![License](https://img.shields.io/github/license/craftslab/gerritaction.svg?color=brightgreen)](https://github.com/craftslab/gerritaction/blob/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/gerritaction.svg?color=brightgreen)](https://pypi.org/project/gerritaction)\n[![Tag](https://img.shields.io/github/tag/craftslab/gerritaction.svg?color=brightgreen)](https://github.com/craftslab/gerritaction/tags)\n\n\n\n## Introduction\n\n*gerritaction* is a tool used for Gerrit action via Gerrit API.\n\n\n\n## Prerequisites\n\n- Python >= 3.7.0\n\n\n\n## Run\n\n```bash\ngit clone https://github.com/craftslab/gerritaction.git\n\ncd gerritaction\npip install -Ur requirements.txt\npython action.py --config-file=\"config.yml\" --gerrit-action=\"delete-reviewer:account-id,...\" --gerrit-query=\"since:2021-01-01 until:2021-01-02\"\n```\n\n\n\n## Docker\n\n```bash\ngit clone https://github.com/craftslab/gerritaction.git\n\ncd gerritaction\ndocker build --no-cache -f Dockerfile -t craftslab/gerritaction:latest .\ndocker 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\"\n```\n\n\n\n## Usage\n\n```\nusage: action.py [-h] --config-file CONFIG_FILE --gerrit-action GERRIT_ACTION --gerrit-query GERRIT_QUERY [-v]\n\nGerrit Action\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --config-file CONFIG_FILE\n                        config file (.yml)\n  --gerrit-action GERRIT_ACTION\n                        gerrit 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)\n  --gerrit-query GERRIT_QUERY\n                        gerrit query (status:open since:2021-01-01 until:2021-01-02)\n  -v, --version         show program's version number and exit\n```\n\n\n\n## Settings\n\n*gerritaction* parameters can be set in the directory [config](https://github.com/craftslab/gerritaction/blob/master/gerritaction/config).\n\nAn example of configuration in [config.yml](https://github.com/craftslab/gerritaction/blob/master/gerritaction/config/config.yml):\n\n```yaml\napiVersion: v1\nkind: worker\nmetadata:\n  name: gerritaction\nspec:\n  gerrit:\n    host: http://127.0.0.1/\n    port: 8080\n    user: user\n    pass: pass\n    query:\n      option:\n        - CURRENT_REVISION\n```\n\n\n\n## License\n\nProject License can be found [here](LICENSE).\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Gerrit Action",
    "version": "1.3.0",
    "project_urls": {
        "Download": "https://github.com/craftslab/gerritaction/archive/v1.3.0.tar.gz",
        "Homepage": "https://github.com/craftslab/gerritaction"
    },
    "split_keywords": [
        "gerrit",
        "action"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4827f219b55467d98ffe2c6f9a629c5b6554be15f5a5c606694e104d25cd98a7",
                "md5": "b5ca00c0c946ce626bf425b9b641d3c4",
                "sha256": "623043045ffbc648a2057af27a0e3f556d06d927cc9e5ef264c8ee6745b3a430"
            },
            "downloads": -1,
            "filename": "gerritaction-1.3.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b5ca00c0c946ce626bf425b9b641d3c4",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 13484,
            "upload_time": "2023-08-02T02:16:39",
            "upload_time_iso_8601": "2023-08-02T02:16:39.897109Z",
            "url": "https://files.pythonhosted.org/packages/48/27/f219b55467d98ffe2c6f9a629c5b6554be15f5a5c606694e104d25cd98a7/gerritaction-1.3.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f4f96c91879a61a3472acd6f11dbfc9f68c2780038c59b0883e4bd5bb2e1240",
                "md5": "b912cc5f780baee04801356bb9323f39",
                "sha256": "06006daf8251f6538955fa1482e33611e933844607a60f5c27fb4baa9210b39a"
            },
            "downloads": -1,
            "filename": "gerritaction-1.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b912cc5f780baee04801356bb9323f39",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12027,
            "upload_time": "2023-08-02T02:16:41",
            "upload_time_iso_8601": "2023-08-02T02:16:41.801032Z",
            "url": "https://files.pythonhosted.org/packages/2f/4f/96c91879a61a3472acd6f11dbfc9f68c2780038c59b0883e4bd5bb2e1240/gerritaction-1.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-02 02:16:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "craftslab",
    "github_project": "gerritaction",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "gerritaction"
}
        
Elapsed time: 0.09546s