Merge pull request 'style 💎: Remove unnecessary blank line and ensure consistent formatting' (#25) from dev into main
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 12s
Gitleaks Scan / gitleaks (push) Successful in 4s
Markdown Lint / markdown-lint (push) Successful in 5s

Reviewed-on: #25
This commit was merged in pull request #25.
This commit is contained in:
2026-02-14 12:09:29 +01:00
3 changed files with 33 additions and 3 deletions

View File

@@ -2,7 +2,10 @@
# .gitea/workflows/ansible-lint.yml # .gitea/workflows/ansible-lint.yml
name: ansible-lint name: ansible-lint
on: [issues, push] on:
push:
issues:
types: [opened]
jobs: jobs:
build: build:

View File

@@ -2,7 +2,10 @@
# .gitea/workflows/markdown-lint.yml # .gitea/workflows/markdown-lint.yml
name: Markdown Lint name: Markdown Lint
on: [issues, push] on:
push:
issues:
types: [opened]
jobs: jobs:
build: build:

View File

@@ -104,6 +104,14 @@ jobs:
"$API/issues/$PR/comments" "$API/issues/$PR/comments"
fi 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 # Add label if missing
LABELS=$(curl -s -H "Authorization: token $TOKEN" "$API/issues/$PR/labels" | jq -r '.[] | .name') LABELS=$(curl -s -H "Authorization: token $TOKEN" "$API/issues/$PR/labels" | jq -r '.[] | .name')
if ! echo "$LABELS" | grep -q "^ci-failed$"; then if ! echo "$LABELS" | grep -q "^ci-failed$"; then
@@ -147,9 +155,15 @@ jobs:
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{\"body\":\"<!--ci-failed-comment-->\n$COMMENT_BODY\"}" \ -d "{\"body\":\"<!--ci-failed-comment-->\n$COMMENT_BODY\"}" \
"$API/issues/$PR/comments/$EXISTING_COMMENT_ID" "$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 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') LABELS=$(curl -s -H "Authorization: token $TOKEN" "$API/issues/$PR/labels" | jq -r '.[] | .name')
if echo "$LABELS" | grep -q "^ci-failed$"; then if echo "$LABELS" | grep -q "^ci-failed$"; then
curl -s -X DELETE \ curl -s -X DELETE \
@@ -157,6 +171,16 @@ jobs:
"$API/issues/$PR/labels/ci-failed" "$API/issues/$PR/labels/ci-failed"
fi 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 # Reopen PR if closed
PR_STATE=$(curl -s -H "Authorization: token $TOKEN" "$API/pulls/$PR" | jq -r '.state') PR_STATE=$(curl -s -H "Authorization: token $TOKEN" "$API/pulls/$PR" | jq -r '.state')
if [ "$PR_STATE" = "closed" ]; then if [ "$PR_STATE" = "closed" ]; then