rapport d'activité: le rapport généré n'est pas du JSON

Corrige #6265
This commit is contained in:
Pierre-Louis Bonicoli 2024-06-16 18:35:02 +02:00
parent 3c40a12635
commit 584cd84b95
Signed by: pilou
GPG Key ID: 06914C4A5EDAA6DD

View File

@ -12,21 +12,12 @@ main() {
} }
post_report() { post_report() {
datafile=$(mktemp /tmp/report_stats_$(date +%Y-%m-%d_%H%M)_XXXX.json) curl -v -s \
cat <<EOF > "${datafile}"
{
"issue": {
"notes": "$(/srv/minetest.chapril.org/tools/rapport_activite/rapport_activite.sh -p| sed -z 's/\n/\\n/g')"
}
}
EOF
curl -s \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "X-Redmine-API-Key: ${REDMINE_API_KEY}" \ -H "X-Redmine-API-Key: ${REDMINE_API_KEY}" \
-X PUT --data-binary "@${datafile}" \ -X PUT --data-binary "@-" \
"${REDMINE_BASE_URL}/issues/${REDMINE_TICKET_ID}.json" "${REDMINE_BASE_URL}/issues/${REDMINE_TICKET_ID}.json" \
rm "${datafile}" < <(/srv/minetest.chapril.org/tools/rapport_activite/rapport_activite_mineclone2.sh -p | jq --raw-input --slurp '{ "issue": {"notes": .} }')
} }
last_comment_date() { last_comment_date() {