npm package diff

Package: @forge/manifest

Versions: 7.5.2-next.0-experimental-10722bc - 7.7.0-next.13

File: package/out/validators/modules-validators/jira/validate-trigger.js

Index: package/out/validators/modules-validators/jira/validate-trigger.js
===================================================================
--- package/out/validators/modules-validators/jira/validate-trigger.js
+++ package/out/validators/modules-validators/jira/validate-trigger.js
@@ -0,0 +1,23 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.validateJiraTriggers = void 0;
+const text_1 = require("../../../text");
+const utils_1 = require("../../../utils");
+function validateJiraTriggers(modules, yamlContentByLine) {
+    const validationErrors = [];
+    modules?.trigger?.forEach((module) => {
+        if (module.filter) {
+            const onlyJiraEvents = module.events.every((e) => e.includes('jira'));
+            if (!onlyJiraEvents) {
+                validationErrors.push({
+                    message: text_1.errors.modules.trigger.filteringWorksOnlyWithJiraEvents(),
+                    reference: text_1.References.Modules,
+                    level: 'error',
+                    ...(0, utils_1.findPosition)(module.key, yamlContentByLine)
+                });
+            }
+        }
+    });
+    return validationErrors;
+}
+exports.validateJiraTriggers = validateJiraTriggers;