3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Merge pull request #480 from iamshoXy/counterfix

fix: wrong key for counter's counter_trigger rule name
This commit is contained in:
Miikka 2024-08-11 22:38:11 +03:00 committed by GitHub
commit 4ead472a22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,7 +33,7 @@ export const zTrigger = z
.optional(),
})
.transform((val, ctx) => {
const ruleName = String(ctx.path[ctx.path.length - 2]).trim();
const ruleName = String(ctx.path[ctx.path.length - 1]).trim();
let reverseCondition = val.reverse_condition;
if (!reverseCondition) {
@ -52,7 +52,7 @@ export const zTrigger = z
});
const zTriggerFromString = zBoundedCharacters(0, 100).transform((val, ctx) => {
const ruleName = String(ctx.path[ctx.path.length - 2]).trim();
const ruleName = String(ctx.path[ctx.path.length - 1]).trim();
const parsedCondition = parseCounterConditionString(val);
if (!parsedCondition) {
ctx.addIssue({