Skip to content

Commit 4429fd3

Browse files
committed
Drop redundant -X POST curl flags
Should reduce warnings. Fixes #26
1 parent b05bea9 commit 4429fd3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ci/release_notes.md

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
- The `text` field of attachments now interpolates environment
44
variables from the container environment (i.e. BUILD_* et al).
55
Fixes #25
6+
7+
- Drop `-X POST` curl flags to silence warnings from curl.
8+
Fixes #26

out

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ EOF
128128
elif [[ "$silent" == "true" ]]
129129
then
130130
echo "Using silent output"
131-
curl -s -X POST --data-urlencode "payload=${compact_body}" ${CURL_OPTION} "${webhook_url}"
131+
curl -s --data-urlencode "payload=${compact_body}" ${CURL_OPTION} "${webhook_url}"
132132
elif [[ ${redact_hook} == "true" ]]
133133
then
134134
url_path="$(echo ${webhook_url} | sed -e "s/https\{0,1\}:\/\/[^\/]*\(\/[^?&#]*\).*/\1/")"
135-
curl -v -X POST --data-urlencode "payload=${compact_body}" ${CURL_OPTION} "${webhook_url}" 2>&1 | sed -e "s#${url_path}#***WEBHOOK URL REDACTED***#g"
135+
curl -v --data-urlencode "payload=${compact_body}" ${CURL_OPTION} "${webhook_url}" 2>&1 | sed -e "s#${url_path}#***WEBHOOK URL REDACTED***#g"
136136
else
137-
curl -v -X POST --data-urlencode "payload=${compact_body}" ${CURL_OPTION} "${webhook_url}" | sed -e "s#${url_path}#***WEBHOOK URL REDACTED***#g"
137+
curl -v --data-urlencode "payload=${compact_body}" ${CURL_OPTION} "${webhook_url}" | sed -e "s#${url_path}#***WEBHOOK URL REDACTED***#g"
138138
fi
139139
else
140140
text="$(echo "" | jq -R -s .)"

0 commit comments

Comments
 (0)