diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab6185147a32c4914b813410596771765ca27aa4..514a2a54f78cd03973bedba3e21f43a480721b0f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,6 +25,23 @@ To run all checks on all files: duniterpy> pre-commit run -a ``` +### Authorization for GitLab CI linter hook +`pre-commit run -a (gitlab-ci-linter)` is failing due to authorization required for CI lint API accesses. +When running this command, just ignore this failed hook. +In case you want to commit a `.gitlab-ci.yml` edition, this hook will prevent the commit creation. +You can [skip the hooks](https://stackoverflow.com/a/7230886) with `git commit -m "msg" --no-verify`. +This is fine for occasional `.gitlab-ci.yml` editions. In case you would like to edit this file more often and have it checked, ask a maintainer to provide you with `GITLAB_PRIVATE_TOKEN` environment variable that can be set into a shell configuration. +With Bash, add the following to your `$HOME/.bashrc`: +```bash +export GITLAB_PRIVATE_TOKEN="" +``` + +With Fish, add the following to your `$HOME/.config/fish/config.fish`: +```fish +set -xg GITLAB_PRIVATE_TOKEN "" +``` +Check out #169 for more details. + ### Black formatting We are using [Black](https://github.com/psf/black) formatter tool. Run Black on a Python file to format it: