aquatix / webhaak

Simple webhook service to update and deploy sites and do other maintenance
Apache License 2.0
1 stars 0 forks source link

How to pass variabled parameters to script? #36

Open sheh1000 opened 4 months ago

sheh1000 commented 4 months ago

Hello,

How can I pass variabled parameters to script execution? In the example the PROJECT_NAME, CULPRIT and others seems like hardcoded

command: /srv/scripts/sentry_to_telegram.sh "PROJECT_NAME" "CULPRIT" "URL" "TITLE" "STACKTRACE"
aquatix commented 4 months ago

Hey,

The ones you see in this example are special cases because webhaak knows these exist for an incoming Sentry message (see https://github.com/aquatix/webhaak/blob/5b83514541eed7e23a2bdb9103ae1131d4874db3/src/webhaak/incoming.py#L136 - they get copied into the hook_info dict and are usable in the task that is executed afterwards). I need to document those :)

Do you want to pass variables that you define yourself? What exactly is your use case? I might be able to facilitate something :)

aquatix commented 20 hours ago

Were you able to make it work? Can you tell me what you are trying to do? Then I can help you better.