Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Commit 8a92734

Browse files
author
vu-bui
committed
KIT-1182 move constants & triggers to event payload
1 parent a28515f commit 8a92734

8 files changed

+8
-8
lines changed

FormatJavaCucumber.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { Webhooks } = require('@qasymphony/pulse-sdk');
22

3-
exports.handler = function (body, { clientContext: { constants, triggers } }, callback) {
3+
exports.handler = function ({ event: body, constants, triggers }, context, callback) {
44
function emitEvent(name, payload) {
55
let t = triggers.find(t => t.name === name);
66
return t && new Webhooks().invoke(t, payload);

FormatPostmanJson.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { Webhooks } = require('@qasymphony/pulse-sdk');
22

3-
exports.handler = function (body, { clientContext: { constants, triggers } }, callback) {
3+
exports.handler = function ({ event: body, constants, triggers }, context, callback) {
44
function emitEvent(name, payload) {
55
let t = triggers.find(t => t.name === name);
66
return t && new Webhooks().invoke(t, payload);

FormatPythonPyTestJUnit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { Webhooks } = require('@qasymphony/pulse-sdk');
22

3-
exports.handler = function (body, { clientContext: { constants, triggers } }, callback) {
3+
exports.handler = function ({ event: body, constants, triggers }, context, callback) {
44
function emitEvent(name, payload) {
55
let t = triggers.find(t => t.name === name);
66
return t && new Webhooks().invoke(t, payload);

LinkScenarioRequirements.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const request = require('request');
22
const { Webhooks } = require('@qasymphony/pulse-sdk');
33

4-
exports.handler = function (body, { clientContext: { constants, triggers } }, callback) {
4+
exports.handler = function ({ event: body, constants, triggers }, context, callback) {
55
function emitEvent(name, payload) {
66
let t = triggers.find(t => t.name === name);
77
return t && new Webhooks().invoke(t, payload);

SlackAction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { Webhooks } = require('@qasymphony/pulse-sdk');
22

3-
exports.handler = function (body, { clientContext: { constants, triggers } }, callback) {
3+
exports.handler = function ({ event: body, constants, triggers }, context, callback) {
44
function emitEvent(name, payload) {
55
let t = triggers.find(t => t.name === name);
66
return t && new Webhooks().invoke(t, payload);

UpdateQTestWithFormattedResults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const request = require('request');
22
const { Webhooks } = require('@qasymphony/pulse-sdk');
33

4-
exports.handler = function (body, { clientContext: { constants, triggers } }, callback) {
4+
exports.handler = function ({ event: body, constants, triggers }, context, callback) {
55
function emitEvent(name, payload) {
66
let t = triggers.find(t => t.name === name);
77
return t && new Webhooks().invoke(t, payload);

scenarioColors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { Webhooks } = require('@qasymphony/pulse-sdk');
22

3-
exports.handler = function (body, { clientContext: { constants, triggers } }, callback) {
3+
exports.handler = function ({ event: body, constants, triggers }, context, callback) {
44
function emitEvent(name, payload) {
55
let t = triggers.find(t => t.name === name);
66
return t && new Webhooks().invoke(t, payload);

triggerJenkins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const request = require('request');
22
const { Webhooks } = require('@qasymphony/pulse-sdk');
33

4-
exports.handler = function (body, { clientContext: { constants, triggers } }, callback) {
4+
exports.handler = function ({ event: body, constants, triggers }, context, callback) {
55
function emitEvent(name, payload) {
66
let t = triggers.find(t => t.name === name);
77
return t && new Webhooks().invoke(t, payload);

0 commit comments

Comments
 (0)