Commit 8a683e47 authored by I-Al-Istannen's avatar I-Al-Istannen
Browse files

Use correct exit code, allow more errors than max argline length

parent a035fabf
Pipeline #177194 failed with stage
in 7 minutes and 47 seconds
......@@ -74,7 +74,7 @@ if [[ "$MJ_EXIT_CODE" == "0" ]]; then
-d "{\"state\":\"closed\", \"body\":$(echo -e "$SUCCESS_CLOSING_BODY" | jq -R -s)}" \
-o /dev/null
fi
exit 0
exit $MJ_EXIT_CODE
fi
......@@ -85,6 +85,7 @@ fi
# |_| \__,_|_|_|\__,_|_| \___|
#
echo "Test failed"
echo -e "Output:\n$MJ_OUTPUT"
CODE_BLOCK_HEADER='```'
BODY="$BODY\n\n----\n\n<details>\n<summary>mjtest output</summary>\n\n$CODE_BLOCK_HEADER\n$MJ_OUTPUT\n$CODE_BLOCK_HEADER\n\n</details>"
......@@ -100,25 +101,28 @@ if [[ "$ISSUE_COUNT" == "0" ]]; then
\"labels\": [\"test-failure-bot\"]
}
"
echo "$JSON" | \
curl -Ss \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-u "$AUTH" \
"$GITHUB_URL/issues" \
-d "$JSON" \
-o /dev/null
exit 0
--data-binary "@-"
exit $MJ_EXIT_CODE
fi
ISSUE_NUMBER="$(echo "$FETCHED_ISSUES" | jq ".[0].number")"
echo -e "\n\n"
echo "Editing issue $ISSUE_NUMBER"
JSON="{\"state\":\"open\", \"body\":$(echo -e "$BODY" | jq -R -s)}"
echo "$JSON" | \
curl -Ss \
-X PATCH \
-H "Accept: application/vnd.github.v3+json" \
-u "$AUTH" \
"$GITHUB_URL/issues/$ISSUE_NUMBER" \
-d "{\"state\":\"open\", \"body\":$(echo -e "$BODY" | jq -R -s)}" \
--data-binary "@-" \
-o /dev/null
exit $MJ_EXIT_CODE
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment