File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212- Ensure cURL returns an error on a failed request
1313
14+ ### Fixed
15+
16+ - Check that a value was provided for the API key
17+
1418## [ 0.0.1] - 2020-04-17
1519
1620### Added
Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ main() {
55 local datadog_host=" ${BUILDKITE_PLUGIN_CREATE_DATADOG_EVENT_DATADOG_HOST:- https:// api.datadoghq.com} "
66 local api_key=" ${BUILDKITE_PLUGIN_CREATE_DATADOG_EVENT_API_KEY} "
77
8+ if [[ -z " $api_key " ]]; then
9+ echo " no API key was provided"
10+ exit 1
11+ fi
12+
813 curl -fsS -X POST \
914 -H " Content-type: application/json" \
1015 -H " DD-API-KEY: ${api_key} " \
You can’t perform that action at this time.
0 commit comments