From f35ff77e489f255c29e9567df81a0c05fe9dfb61 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 2 Aug 2024 18:59:39 +0100 Subject: [PATCH] docs: add example to readme for listen, shout & storage --- crates/cli/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/crates/cli/README.md b/crates/cli/README.md index d9f072b..3e56713 100644 --- a/crates/cli/README.md +++ b/crates/cli/README.md @@ -89,6 +89,14 @@ The server is configured by the `git-next-server.toml` file. #### listen +The server should listen for webhook notifications from each forge. + +```toml +[listen] +http = { addr = "0.0.0.0", port = 8080 } +url = "https://localhost:8080" +``` + ##### http The server needs to be able to receive webhook notifications from your forge, @@ -116,6 +124,21 @@ forge is running on. The server should be able to notify the user when manual intervention is required. +```toml +[shout.webhook] +url = "https//localhost:9090" +secret = "secret-password" + +[shout.email] +from = "git-next@example.com" +to = "developer@example.com" + +[shout.email.smtp] +hostname = "smtp.example.com" +username = "git-next@example.com" +password = "MySecretEmailPassword42" +``` + ##### webhook Will send a POST request for some events. @@ -147,6 +170,11 @@ Will send emails using an SMTP relay. #### storage +```toml +[storage] +path = "./data" +``` + `git-next` will create a bare clone of each repo that you configure it to monitor. They will all be created in the directory specified here. This data does not need to be backed up, as any missing information will be cloned when