diff --git a/.github/workflows/map-diff.yml b/.github/workflows/map-diff.yml index 745d132c1c6..5a8348d2511 100644 --- a/.github/workflows/map-diff.yml +++ b/.github/workflows/map-diff.yml @@ -60,12 +60,11 @@ jobs: json=$(curl -s -F image=@diff_image.png https://api.imgur.com/3/upload | tee /dev/stderr) log 'Generating HTML comment...' - html=$(printf %s "$json" | jq -rRs --arg path "$map_path" --arg dim "$old_dim -> $new_dim" '. as $input | - try fromjson catch ({error:$input}) | @html " -

\($path)

dimensions: \($dim)

- \"\(if
-
imgur response

\(tojson)

"') - comment_body+=$html + # careful with leading spaces in the output since it is ultimately markdown (with embedded html) so the indentation may have meaning + html=$(printf %s "$json" | jq -rRs --arg path "$map_path" --arg dim "$old_dim ➔ $new_dim" '. as $input | + try fromjson catch ({error:$input}) | (if .data.link then "map diff image" else "image upload failed" end) as $alt | + @html "

\($path)

dimensions: \($dim)

\"\($alt)\"/
imgur response

\(tojson)

"') + comment_body+=$html$'\n' done [[ $comment_body ]] || err Failed to generate comment