style 💎: Remove unnecessary blank line and ensure consistent formatting #25

Merged
Jose merged 4 commits from dev into main 2026-02-14 12:09:29 +01:00
Showing only changes of commit 5ff377223a - Show all commits

View File

@@ -147,6 +147,12 @@ jobs:
-H "Content-Type: application/json" \
-d "{\"body\":\"<!--ci-failed-comment-->\n$COMMENT_BODY\"}" \
"$API/issues/$PR/comments/$EXISTING_COMMENT_ID"
else
curl -s -X POST \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d "$COMMENT_PAYLOAD" \
"$API/issues/$PR/comments"
fi
# Remove label if exists
@@ -157,6 +163,16 @@ jobs:
"$API/issues/$PR/labels/ci-failed"
fi
# Add ci-pass if not present
if ! echo "$LABELS" | grep -q "^ci-pass$"; then
echo "Adding ci-pass label"
curl -s -X POST \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d '{"labels":["ci-pass"]}' \
"$API/issues/$PR/labels"
fi
# Reopen PR if closed
Review

[Lines 155-176] [Score: 2] The code has been modified to remove the 'ci-failed' label if it exists and add the 'ci-pass' label if it doesn't. While this is a good practice to ensure that at least one of these labels is always present, it might lead to inconsistency in label usage, as removing the 'ci-failed' label could happen before it is added back in certain scenarios.

[Lines 155-176] [Score: 2] The code has been modified to remove the 'ci-failed' label if it exists and add the 'ci-pass' label if it doesn't. While this is a good practice to ensure that at least one of these labels is always present, it might lead to inconsistency in label usage, as removing the 'ci-failed' label could happen before it is added back in certain scenarios.
PR_STATE=$(curl -s -H "Authorization: token $TOKEN" "$API/pulls/$PR" | jq -r '.state')
if [ "$PR_STATE" = "closed" ]; then