workflow-webhook
workflow-webhook copied to clipboard
Update entrypoint.sh :: Convert envs to lowercase & remove `input_`
I'd like to suggest the following features:
- Iterate over environment variables starting with INPUT_ and export them as lowercase variables without input_ prefix.
- I don't think you need the
elif [ -n "$MAX_TIME" ]; then; max_time=$MAX_TIME; fi
blocks because users should only use the inputs from awith
directive as described in all the readme.
- I don't think you need the
- Add a trap config to print the line number of any errors. This was immensely useful for my team to debug and understand how to use your action.
- Add
Connection: close
header to curl requests.- Helps the CURL requests exit faster as well as letting the targets release their connection faster. Too many
/github-webhook/
calls on Jenkins instances cause latency from my experience.
- Helps the CURL requests exit faster as well as letting the targets release their connection faster. Too many
- Update
User-Agent: GitHub-Hookshot/$REQUEST_ID
to be dynamic.- The Delivery headers docs don't really explain how this header is used but should it be hard-coded to some value we don't know what it means?
- Change to build headers & auth_header just like the curl_options. This way we can have just 1 place we actually make a curl request.
- Add
curl_connection_close
input to optionally disable adding of the-H Connection: close
header.