Clean up webhook temp file

Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-25 01:57:12 +00:00
parent 1f37236f80
commit 823dce3477

View File

@ -339,6 +339,7 @@ jobs:
] ]
}') }')
response_file=$(mktemp) response_file=$(mktemp)
trap 'rm -f "$response_file"' EXIT
http_code=$(curl -sS -o "$response_file" -w "%{http_code}" \ http_code=$(curl -sS -o "$response_file" -w "%{http_code}" \
-H "Content-Type: application/json" -d "$payload" "$DISCORD_WEBHOOK_URL") -H "Content-Type: application/json" -d "$payload" "$DISCORD_WEBHOOK_URL")
curl_status=$? curl_status=$?
@ -349,3 +350,4 @@ jobs:
if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then
echo "Discord notification failed with HTTP $http_code: $(cat "$response_file")" echo "Discord notification failed with HTTP $http_code: $(cat "$response_file")"
fi fi
exit 0