@cryptotaxi247 / CoPilot / commits / 9b23a1f6

refactor: remove commented-out get_customer_code function and update CURRENT_VERSION to 0.1.13 (#565)

taylor_socfortress committed Dec 17, 2025 at 08:18 UTC 9b23a1f6935b7788443aff366ce9eba1588826a8
3 files changed +4 -24
backend/app/incidents/services/incident_alert.py
-22
@@ -232,28 +232,6 @@ async def construct_soc_alert_url(root_url: str, soc_alert_id: int) -> str:
232 return f"{root_url}{url_path}"
233
234
235 -# async def get_customer_code(alert_details: dict):
236 -# logger.info(f"Fetching customer code for alert {alert_details}")
237 -
238 -# # Iterate over the possible keys and return the value if the key is present
239 -# for key in CustomerCodeKeys:
240 -# logger.info(f"Checking for key {key.value}")
241 -# if key.value in alert_details:
242 -# value = alert_details[key.value]
243 -# if key == CustomerCodeKeys.CLUSTER_NODE:
244 -# processed_value = CustomerCodeKeys.get_processed_value(key, value)
245 -# logger.info(f"Processed value for {key.value} is {processed_value}")
246 -# return processed_value
247 -# return value
248 -
249 -# # If none of the keys are present, raise an exception
250 -# logger.info(f"Failed to fetch customer code. Valid customer code field names are {', '.join([key.value for key in CustomerCodeKeys])}")
251 -# raise HTTPException(
252 -# status_code=400,
253 -# detail=f"Failed to fetch customer code. Valid customer code field names are {', '.join([key.value for key in CustomerCodeKeys])}",
254 -# )
255 -
256 -
235 async def get_customer_code(alert_details: dict, session: AsyncSession = None):
236 """
237 Fetch the customer code from alert details.
backend/app/integrations/alert_escalation/schema/escalate_alert.py
+3 -1
@@ -20,7 +20,9 @@ class CustomerCodeKeys(Enum):
20 def get_processed_value(key, value):
21 if key == CustomerCodeKeys.CLUSTER_NODE:
22 if value.startswith("wazuh.worker."):
23 - return value.replace("wazuh.worker.", "").lower()
23 + parts = value.split(".")
24 + if len(parts) >= 3:
25 + return parts[2].lower()
26 return value
27
28
backend/app/version/services/version.py
+1 -1
@@ -7,7 +7,7 @@ from loguru import logger
7 from packaging.version import Version
8
9 # Current version - update this with each release
10 -CURRENT_VERSION = "0.1.12"
10 +CURRENT_VERSION = "0.1.13"
11 VERSION_CHECK_URL = "https://api.github.com/repos/socfortress/CoPilot/releases/latest"
12
13