Crates.io | GitPolicyEnforcer |
lib.rs | GitPolicyEnforcer |
version | 0.3.0 |
source | src |
created_at | 2021-05-16 11:25:37.269376 |
updated_at | 2022-04-07 07:43:20.313148 |
description | GitPolicyEnforcer is a command-line tool that helps you enforce Git policies through Git hooks, both server and client side |
homepage | https://github.com/Vagelis-Prokopiou/GitPolicyEnforcer |
repository | https://github.com/Vagelis-Prokopiou/GitPolicyEnforcer |
max_upload_size | |
id | 398151 |
size | 40,428 |
This is a command line utility written in Rust, that helps you utilize Git hooks, to enforce various policies.
It currently supports only the update
server side Git hook. The goal is to include client side hooks too.
The tool has been developed so far for usage with self-hosted GitLab CE instances, due to internal needs. It should also work though, for bare git servers (maybe with some minor changes).
This is work in progress. You are welcome to contribute if this project is useful to you.
For now, please check the following YouTube video:
According to time availability, more documentation will be added, and further development will happen.
You can quickly test you regexes both for successful regex creation and value validation, before deploying by using the respective feature. Example usage:
Expected to succeed:
gpe --regex '^\d test$' --regex-value '1 test'
Expected to fail at value validation:
gpe --regex '^\d test$' --regex-value 'hello world'
Expected to fail during regex creation:
gpe --regex '^\e{1,1}$' --regex-value 'hello world'
You need a Rust installation in order to compile it.
To build GitPolicyEnforcer:
git clone https://github.com/Vagelis-Prokopiou/GitPolicyEnforcer
cd GitPolicyEnforcer
cargo build --release
./target/release/gpe --help
The produced binary is gpe
located in the GitPolicyEnforcer/target/release
directory.
GitPolicyEnforcer is distributed under the terms of both the MIT license and the Apache License (Version 2.0).