Procházet zdrojové kódy

fix deleting outdated comments

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky před 4 roky
rodič
revize
097434916e
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      scripts/uploadReport.sh

+ 1 - 1
scripts/uploadReport.sh

@@ -9,7 +9,7 @@ upload() {
     echo "Uploaded failing tests to https://www.kaminsky.me/nc-dev/android-integrationTests/$REMOTE_FOLDER"
 
     # delete all old comments, matching this type
-    oldComments=$(curl 2>/dev/null -u $GITHUB_USER:$GITHUB_PASSWORD -X GET https://api.github.com/repos/nextcloud/android/issues/$PR/comments | jq --arg type $BRANCH_TYPE '.[] | (.id |tostring) + "|" + (.user.login | test("nextcloud-android-bot") | tostring) + "|" + (.body | test("[$TYPE] test failed.*") | tostring)'| grep "true|true" | tr -d "\"" | cut -f1 -d"|")
+    oldComments=$(curl 2>/dev/null -u $GITHUB_USER:$GITHUB_PASSWORD -X GET https://api.github.com/repos/nextcloud/android/issues/$PR/comments | jq --arg type $BRANCH_TYPE '.[] | (.id |tostring) + "|" + (.user.login | test("nextcloud-android-bot") | tostring) + "|" + (.body | test([$TYPE]) | tostring)'| grep "true|true" | tr -d "\"" | cut -f1 -d"|")
 
     echo $oldComments | while read comment ; do
         curl 2>/dev/null -u $GITHUB_USER:$GITHUB_PASSWORD -X DELETE https://api.github.com/repos/nextcloud/android/issues/comments/$comment