Gerrit to GitHub / GitLab
Project description
gerrit-to-platform
Gerrit hooks to allow using GitHub and GitLab as CI platforms.
To use, install the Gerrit hooks plugin and then symlink the hooks from the virtualenv that has the package installed.
A Python 3.8 or greater environment
Repositories that use the CI platform must have full mirroring replication configured. In specific refs/* must be in the replication set and not refs/heads/*
To activate a given hook, symlink the installed hook in the gerrit hooks directory.
Two configuration files needed. These files are:
~gerrituser/.config/gerrit_to_platform/gerrit_to_platform.ini
~gerrituser/.config/gerrit_to_platform/replication.config
The replication.config file should be a symlink to the standard Gerrit replication.config file
The gerrit_to_platform.ini file has the following format:
[mapping "content-added"] recheck = verify remerge = merge [github.com] token = <a_token_that_allows_triggering_actions> [gitlab.com] token = <a_token_that_allows_triggering_workflows>
The content-added mapping section is a key value pair for comment triggers to the corresponding workflow name or filename
Making Changes & Contributing
This project uses pre-commit, please make sure to install it before making any changes:
pip install pre-commit cd gerrit_to_platform pre-commit install pre-commit install -t commit-msg
Don’t forget to tell your contributors to also install and use pre-commit.
Note
PyScaffold 4.4 provided the initial project setup. For details and usage information on PyScaffold see https://pyscaffold.org/.
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
Built Distribution
File details
Details for the file gerrit-to-platform-0.1.0.tar.gz
.
File metadata
- Download URL: gerrit-to-platform-0.1.0.tar.gz
- Upload date:
- Size: 41.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 343cf8d62cd0d2c7fe848b2cc888a1bc0a7e9c0c1d280d71c5e4b00f2bbf0566 |
|
MD5 | c162da9b9179c83aa5dd119c708d4db4 |
|
BLAKE2b-256 | 695cd6b44fefff8b6064f6cd2bb03cb2c03961aec8ec5e3f009d0f04e8f43a0b |
File details
Details for the file gerrit_to_platform-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: gerrit_to_platform-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d80e4ca7f8c91da48a79e77ed03c58167aa81d0da634b2c5dc88c5a441c42281 |
|
MD5 | dc36a00158bea10dabdce1fbc182bc56 |
|
BLAKE2b-256 | 68886a62b54bb30dbd49537b701ccf18779e89e9ef19eac16603b9f9e48ab96c |