bencao / netlify-plugin-inline-functions-env

Inline build time environment variable values into netlify function code so that it becomes available at runtime
MIT License
42 stars 10 forks source link

Support for INCOMING_HOOK_** Variables #49

Open ONeill45 opened 2 years ago

ONeill45 commented 2 years ago

Currently attempting to use the payload saved in INCOMING_HOOK_BODY to do some conditional logic in a deploy-succeeded function on my Gatsby site. The webhook is fired from Contentful which sends the appropriate payload. I am also able to echo the value of $INCOMING_HOOK_BODY during the build to confirm it is populated when the build is triggered by the webhook on Contentful.

Screen Shot 2022-05-20 at 4 08 40 PM

Screen Shot 2022-05-20 at 4 08 59 PM

Screen Shot 2022-05-20 at 4 08 23 PM

However, I have been unable to make the value usable in my function after the deploy succeeds. I have tried to write it to a file, but it is always empty. I tried this package, and while it seems to work with the other build variables from Netlify, I am not having any luck with INCOMING_HOOK_BODY. Is it possible to add support for these variables?