[GH-ISSUE #9] Make data optional #714

Closed
opened 2026-04-16 13:52:49 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @AnandChowdhary on GitHub (Apr 10, 2020).
Original GitHub issue: https://github.com/joelwmale/webhook-action/issues/9

Currently, in entrypoint.sh#L4, data is passed regardless of whether it exists as an environment variable.

This results in the following error (https://github.com/Karuna2020/open-data/runs/575048122) in case only WEBHOOK_URL is available as an environment variable, not data:

/entrypoint.sh: 4: /entrypoint.sh: data: parameter not set

It would be nice if this wasn't thrown, and the POST request goes through without adding the body.

Originally created by @AnandChowdhary on GitHub (Apr 10, 2020). Original GitHub issue: https://github.com/joelwmale/webhook-action/issues/9 Currently, in [entrypoint.sh#L4](https://github.com/joelwmale/webhook-action/blob/master/entrypoint.sh#L4), data is passed regardless of whether it exists as an environment variable. This results in the following error (https://github.com/Karuna2020/open-data/runs/575048122) in case only `WEBHOOK_URL` is available as an environment variable, not `data`: ``` /entrypoint.sh: 4: /entrypoint.sh: data: parameter not set ``` It would be nice if this wasn't thrown, and the POST request goes through without adding the body.
Author
Owner

@joelwmale commented on GitHub (Aug 26, 2020):

The body input is now optional as part of v2.0.0

<!-- gh-comment-id:680392864 --> @joelwmale commented on GitHub (Aug 26, 2020): The body input is now optional as part of [v2.0.0](https://github.com/joelwmale/webhook-action/releases/tag/2.0.0)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/webhook-action#714