Repository navigation
|
I've probably touched xyOps only on the surface yet, but even there the breadth and depth of features and functionality is amazing! 👏 I might have missed it, but what I'm struggling with is the concept of how to hand-over details from within an Event to a Web Hook which is triggered by a Job Action. The specific use case: An Event is starting an antivirus scan via shell script; based on the result of the scan (e.g. if a virus is found), a parameter should be set (e.g. priority = high); this parameter should be used in the Web Hook to in turn set the priority in the message sent to ntfy.sh (e.g. priority = 5). What I've managed so far is to access standard parameters like e.g. Any hint would be appreciated! Thanks in advance! |
Replies: 2 comments 2 replies
|
Hi there! And thank you for trying out xyOps. Ah, you've discovered a bug. I was failing to promote the job output data into the hook data which is used by actions. So sorry about that. A fix is coming ASAP. Once the new build is out (should be tonight or tomorrow at the latest): What you want to do is, inside your event plugin shell code, output some "data" for xyOps to pick up, like this: echo '{ "xy":1, "data":{ "priority":"high" } }'This will populate Thank you for reporting this! |
Hi there! And thank you for trying out xyOps.
Ah, you've discovered a bug. I was failing to promote the job output data into the hook data which is used by actions. So sorry about that. A fix is coming ASAP.
Once the new build is out (should be tonight or tomorrow at the latest):
What you want to do is, inside your event plugin shell code, output some "data" for xyOps to pick up, like this:
This will populate
job.datawhich actions (including web hooks) can access. So then you can use macro placeholders in the web hook content body like this:Thank you for reporting this!