Skip to content

Commit 01a95cd

Browse files
Merge pull request #51985 from aireilly/remove-vale-pipedream
Removing pipedream from the Vale script
2 parents 341cace + b8c6169 commit 01a95cd

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

scripts/check-with-vale.sh

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,9 @@ if [ -n "${FILES}" ] ;
1515
if [ "$TRAVIS" = true ] ; then
1616
#clean out conditional markup in Travis CI
1717
sed -i -e 's/ifdef::.*\|ifndef::.*\|ifeval::.*\|endif::.*/ /' ${FILES}
18-
echo ""
19-
vale ${FILES} --glob='*.adoc' --no-exit
20-
echo ""
21-
set -x
22-
#run vale again, and this time send to pipedream
23-
PR_DATA=''
24-
if [ "$1" == false ] ; then
25-
PR_DATA='{"PR": [{"Number": "None", "SHA": "None"}],'
26-
else
27-
PR_DATA='{"PR": [{"Number": "'"$1"'", "SHA": "'"$2"'"}]',
28-
fi
29-
echo "${PR_DATA}" > vale_errors.json
30-
ERROR_DATA=$(vale ${FILES} --minAlertLevel=error --glob='*.adoc' --output=JSON --no-exit)
31-
echo "${ERROR_DATA:1}" >> vale_errors.json
32-
LAST_LINE=$(tail -n1 vale_errors.json)
33-
if echo "$LAST_LINE" | grep -q ',.$'; then
34-
echo "No Vale errors."
35-
else
36-
curl -H "Content-Type: text/json" --data "@vale_errors.json" https://eox4isrzuh8pnai.m.pipedream.net
37-
fi
18+
vale ${FILES} --glob='*.adoc' --minAlertLevel=error --no-exit
3819
else
39-
echo ""
40-
vale ${FILES} --glob='*.adoc'
41-
echo ""
20+
vale ${FILES} --glob='*.adoc' --minAlertLevel=suggestion
4221
fi
4322
else
4423
echo "No asciidoc files added or modified."

0 commit comments

Comments
 (0)