From 6bb4185224a52a1d7052c6e55e2bb83e4f4e7248 Mon Sep 17 00:00:00 2001 From: EricDing <128116675+sadadw1@users.noreply.github.com> Date: Thu, 23 May 2024 20:37:17 +0800 Subject: [PATCH] fix: update webhook (#348) * fix: update live demo url * fix: update webhook --- .../run/mone/hera/webhook/service/HeraWebhookService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ozhera-webhook/ozhera-webhook-server/src/main/java/run/mone/hera/webhook/service/HeraWebhookService.java b/ozhera-webhook/ozhera-webhook-server/src/main/java/run/mone/hera/webhook/service/HeraWebhookService.java index 8eb3847fc..2e7168593 100644 --- a/ozhera-webhook/ozhera-webhook-server/src/main/java/run/mone/hera/webhook/service/HeraWebhookService.java +++ b/ozhera-webhook/ozhera-webhook-server/src/main/java/run/mone/hera/webhook/service/HeraWebhookService.java @@ -55,7 +55,7 @@ public class HeraWebhookService { private static final String MIONE_PROJECT_ENV_ID = "MIONE_PROJECT_ENV_ID"; // cad need env // "-" replace of "_" - private static final String APPLICATION = "APPLICATION"; + private static final String APPLICATION = "application"; private static final String SERVER_ENV = "serverEnv"; private static final String POD_IP_CAD = "POD_IP"; @@ -508,7 +508,7 @@ private String getAppValueByAppKeyType(JSONObject admissionRequest) { private String getEnvValueByEnvKeyType(JSONObject admissionRequest) { String envLabelValue = null; if ("label".equals(envKeyType)) { - envLabelValue = getLabelValue(appKeyName, admissionRequest.getJSONObject("object") + envLabelValue = getLabelValue(envKeyName, admissionRequest.getJSONObject("object") .getJSONObject("metadata").getJSONObject("labels")); } else if ("env".equals(envKeyType)) { envLabelValue = System.getenv(envKeyName);