style 💎: Remove unnecessary blank line and ensure consistent formatting #25
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user
[Lines 107-117] [Score: 2] The code has been modified to remove the 'ci-pass' label if it exists and add it back if it doesn't. This might lead to inconsistency in label usage, as removing the label could happen before it is added back in certain scenarios.