From f4ac5f8aa647f797369f23fac26437f18306209e Mon Sep 17 00:00:00 2001 From: Kanishk Pachauri Date: Thu, 30 May 2024 02:36:21 +0530 Subject: [PATCH] docs: Add docs for pre-commit setup --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 269c024..c6ab751 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,8 @@ The following services are exposed: ### Secrets Discovery and namespacing 1. For each PR, Sarthi creates a preview environment using the `docker-compose` specified. -2. Sarthi finds the secret for the service as follows. +2. Before Submitting a Pull Request, install pre-commit using `pip3 install pre-commit` and install the pre-commit git hooks: `pre-commit install`. +3. Sarthi finds the secret for the service as follows. - Check the vault under the `project/feature-branch` namespace and find secrets there. - There is a default namespace reserved for developers to specify default secrets for all the PS. Secrets defined under `project/default-dev-secrets` are used if `project/feature-branch` secret path is empty. - If the default namespace is not configured as well, Sarthi automatically tries to find `sample.env`, `env.sample`, `.env.sample` and similar sample env files in the root directory and loads those sample environment variables to both `default-dev-secrets` and `project/feature-branch`