File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- #! /bin/zsh
1+ #! /bin/bash
22
33diffFiles=./screenshotDiffs
44mkdir $diffFiles
@@ -13,8 +13,8 @@ PR=$(echo "$GITHUB_REF_NAME" | sed "s/\// /" | awk '{print $1}')
1313echo pr=$PR
1414brew install jq
1515
16- # delete all old comments, starting with " Screenshot differs:"
17- oldComments=$( curl_gh -X GET https://api.github.com/repos/" $GITHUB_REPOSITORY " /issues/" $PR " /comments | jq ' .[] | (.id |tostring) + "|" + (.user.login | test("github-actions") | tostring) + "|" + (.body | test("Screenshot differs:.*") | tostring)' | grep " true|true" | tr -d " \" " | cut -f1 -d" |" )
16+ echo " delete all old comments, starting with Screenshot differs:$emulatorApi "
17+ oldComments=$( curl_gh -X GET https://api.github.com/repos/" $GITHUB_REPOSITORY " /issues/" $PR " /comments | jq ' .[] | (.id |tostring) + "|" + (.user.login | test("github-actions") | tostring) + "|" + (.body | test("Screenshot differs:' $emulatorApi ' .*") | tostring)' | grep " true|true" | tr -d " \" " | cut -f1 -d" |" )
1818echo " comments=$comments "
1919echo " $oldComments " | while read comment; do
2020 echo " delete comment=$comment "
@@ -45,7 +45,7 @@ for f in *.png; do
4545done
4646
4747if [ ! " $body " == " " ]; then
48- curl_gh -X POST https://api.github.com/repos/" $GITHUB_REPOSITORY " /issues/$PR /comments -d " { \" body\" : \" Screenshot differs: $COUNTER <br/><br/> $body \" }"
48+ curl_gh -X POST https://api.github.com/repos/" $GITHUB_REPOSITORY " /issues/$PR /comments -d " { \" body\" : \" Screenshot differs:$emulatorApi $COUNTER <br/><br/> $body \" }"
4949fi
5050
5151popd 1> /dev/null
You can’t perform that action at this time.
0 commit comments