We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b88e496 + 0e43aaf commit 9c6e045Copy full SHA for 9c6e045
src/webhook.js
@@ -0,0 +1,23 @@
1
+// Handle only webhook events
2
+export const handler = async (event, context) => {
3
+ console.log("Event: ", event);
4
+ console.log("Context: ", context);
5
+ const { changelog } = event;
6
+ console.log("Changelog: ", changelog);
7
+
8
+ if (event.type === "avi:jira:created:issue") {
9
+ return handleIssueCreated(event);
10
+ }
11
12
+ if (event.type === "avi:jira:updated:issue") {
13
+ return handleIssueUpdated(event);
14
15
+};
16
17
+const handleIssueCreated = async (event) => {
18
+ console.log("Issue created");
19
20
21
+const handleIssueUpdated = async (event) => {
22
+ console.log("Issue updated");
23
0 commit comments