From 867bedc5e228b325398f4b0a1a1728cabe02ebdd Mon Sep 17 00:00:00 2001 From: Kolezhanchik Date: Fri, 27 Sep 2024 09:05:27 -0700 Subject: [PATCH] chore: remove noQuotaChange check from auto approval --- app/helpers/auto-approval-check.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/helpers/auto-approval-check.ts b/app/helpers/auto-approval-check.ts index 4f45d5f6a..6a9a76e2e 100644 --- a/app/helpers/auto-approval-check.ts +++ b/app/helpers/auto-approval-check.ts @@ -139,13 +139,11 @@ export const checkIfQuotaAutoApproval = async ( productionQuota: currentQuota.productionQuota, }; - let isAutoApprovalAvailable = checkNoQuotaChange(castCurrentQuota, requestedQuota); - if (!isAutoApprovalAvailable) { - isAutoApprovalAvailable = !checkIfQuotaUpgrade(castCurrentQuota, requestedQuota); - } - const namespaceNames: string[] = []; - const resourceNames: string[] = []; + let isAutoApprovalAvailable = !checkIfQuotaUpgrade(castCurrentQuota, requestedQuota); + if (!isAutoApprovalAvailable) { + const namespaceNames: string[] = []; + const resourceNames: string[] = []; let hasIncreasedSignificantly = false; // Iterate over each environment's quota // @ts-ignore