From 2ccecf38f28d4da43cad467698efbac0b692d44c Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Fri, 5 Jul 2024 02:15:35 -0700 Subject: [PATCH] default pk path /github/private-key.pem --- bin/core/src/api/write/build.rs | 3 ++- bin/core/src/api/write/repo.rs | 3 ++- client/core/rs/src/entities/config/core.rs | 6 +++--- config_example/core.config.example.toml | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bin/core/src/api/write/build.rs b/bin/core/src/api/write/build.rs index 596cda679..396de8c92 100644 --- a/bin/core/src/api/write/build.rs +++ b/bin/core/src/api/write/build.rs @@ -99,6 +99,7 @@ impl Resolve for State { host, github_webhook_base_url, github_webhook_app, + github_webhook_secret, .. } = core_config(); @@ -134,7 +135,7 @@ impl Resolve for State { active: Some(true), config: Some(ReposCreateWebhookRequestConfig { url, - secret: core_config().github_webhook_secret.to_string(), + secret: github_webhook_secret.to_string(), content_type: String::from("json"), insecure_ssl: None, digest: Default::default(), diff --git a/bin/core/src/api/write/repo.rs b/bin/core/src/api/write/repo.rs index 6e32f536a..e665e8966 100644 --- a/bin/core/src/api/write/repo.rs +++ b/bin/core/src/api/write/repo.rs @@ -101,6 +101,7 @@ impl Resolve for State { host, github_webhook_base_url, github_webhook_app, + github_webhook_secret, .. } = core_config(); @@ -143,7 +144,7 @@ impl Resolve for State { active: Some(true), config: Some(ReposCreateWebhookRequestConfig { url, - secret: core_config().github_webhook_secret.to_string(), + secret: github_webhook_secret.to_string(), content_type: String::from("json"), insecure_ssl: None, digest: Default::default(), diff --git a/client/core/rs/src/entities/config/core.rs b/client/core/rs/src/entities/config/core.rs index 811f47e62..23548b0c4 100644 --- a/client/core/rs/src/entities/config/core.rs +++ b/client/core/rs/src/entities/config/core.rs @@ -235,8 +235,8 @@ fn default_config_path() -> String { /// # github_webhook_app.owners = ["mbecker20"] # List of the repo owners which the app has access to. /// /// ## Path to github webhook app private key. -/// ## This is defaulted to `/github-private-key.pem`, and doesn't need to be changed if running in Docker. -/// ## Just mount the private key pem file on the host to `/github-private-key.pem` in the container. +/// ## This is defaulted to `/github/private-key.pem`, and doesn't need to be changed if running in Docker. +/// ## Just mount the private key pem file on the host to `/github/private-key.pem` in the container. /// # github_webhook_app.pk_path = "/path/to/pk.pem" /// /// ## MUST comment back in some way to configure mongo. @@ -607,7 +607,7 @@ pub struct GithubWebhookAppConfig { } fn default_private_key_path() -> String { - String::from("/github-private-key.pem") + String::from("/github/private-key.pem") } impl Default for GithubWebhookAppConfig { diff --git a/config_example/core.config.example.toml b/config_example/core.config.example.toml index 2e65372be..5e5306f4b 100644 --- a/config_example/core.config.example.toml +++ b/config_example/core.config.example.toml @@ -88,8 +88,8 @@ passkey = "a_random_passkey" # github_webhook_app.owners = ["mbecker20"] # List of the repo owners which the app has access to. ## Path to github webhook app private key. -## This is defaulted to `/github-private-key.pem`, and doesn't need to be changed if running in Docker. -## Just mount the private key pem file on the host to `/github-private-key.pem` in the container. +## This is defaulted to `/github/private-key.pem`, and doesn't need to be changed if running in Docker. +## Just mount the private key pem file on the host to `/github/private-key.pem` in the container. # github_webhook_app.pk_path = "/path/to/pk.pem" ## an alternate base url that is used to recieve github webhook requests