[SILO-726] fix: sentry values fields converted from string to array (#4906)

* fix: sentry values fields converted from string to array

* fix: handled both cases with arrqys and strings
This commit is contained in:
Henit Chobisa
2025-11-28 19:04:06 +05:30
committed by GitHub
parent 717c5b9447
commit 18b3698b4e
@@ -123,11 +123,19 @@ export class SentryAlertHandler implements ISentryTaskHandler {
const labels = sentryEventAlert.data.issue_alert.settings.find((setting) => setting.name === "labels");
const state = sentryEventAlert.data.issue_alert.settings.find((setting) => setting.name === "state");
if (assigneeIds?.value && !Array.isArray(assigneeIds.value)) {
assigneeIds.value = [assigneeIds.value as string];
}
if (labels?.value && !Array.isArray(labels.value)) {
labels.value = [labels.value as string];
}
return {
type: type?.value as string,
projectId: projectId?.value as string,
assigneeIds: (assigneeIds?.value as string[]) || [],
labels: (labels?.value as string[]) || [],
assigneeIds: assigneeIds?.value as string[],
labels: labels?.value as string[],
state: state?.value as string,
};
}