diff --git a/.gitea/workflows/pr-check.yaml b/.gitea/workflows/pr-check.yaml index ea46251..1b221a8 100644 --- a/.gitea/workflows/pr-check.yaml +++ b/.gitea/workflows/pr-check.yaml @@ -104,6 +104,14 @@ jobs: "$API/issues/$PR/comments" fi + # Remove ci-pass +label if exists + LABELS=$(curl -s -H "Authorization: token $TOKEN" "$API/issues/$PR/labels" | jq -r '.[] | .name') + if echo "$LABELS" | grep -q "^ci-pass$"; then + curl -s -X DELETE \ + -H "Authorization: token $TOKEN" \ + "$API/issues/$PR/labels/ci-pass" + fi + # Add label if missing LABELS=$(curl -s -H "Authorization: token $TOKEN" "$API/issues/$PR/labels" | jq -r '.[] | .name') if ! echo "$LABELS" | grep -q "^ci-failed$"; then @@ -155,7 +163,7 @@ jobs: "$API/issues/$PR/comments" fi - # Remove label if exists + # Remove ci-failed +label if exists LABELS=$(curl -s -H "Authorization: token $TOKEN" "$API/issues/$PR/labels" | jq -r '.[] | .name') if echo "$LABELS" | grep -q "^ci-failed$"; then curl -s -X DELETE \