From 18e0ed96eae8a545ecf54f6ac96ab25116eb7569 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 11:09:55 +0100 Subject: [PATCH 1/4] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Refactor?= =?UTF-8?q?=20event=20triggers=20for=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the `ansible-lint` and `markdown-lint` workflows by adding new event types (`opened`) to their issue triggers. --- .gitea/workflows/ansible-lint.yml | 5 ++++- .gitea/workflows/markdown-lint.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ansible-lint.yml b/.gitea/workflows/ansible-lint.yml index 649b84f..e1db5e5 100644 --- a/.gitea/workflows/ansible-lint.yml +++ b/.gitea/workflows/ansible-lint.yml @@ -2,7 +2,10 @@ # .gitea/workflows/ansible-lint.yml name: ansible-lint -on: [issues, push] +on: + push: + issues: + types: [opened] jobs: build: diff --git a/.gitea/workflows/markdown-lint.yml b/.gitea/workflows/markdown-lint.yml index cc37469..fde15ce 100644 --- a/.gitea/workflows/markdown-lint.yml +++ b/.gitea/workflows/markdown-lint.yml @@ -2,7 +2,10 @@ # .gitea/workflows/markdown-lint.yml name: Markdown Lint -on: [issues, push] +on: + push: + issues: + types: [opened] jobs: build: From 5ff377223ad3b347648f1bd9014d0b9f3770810d Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 11:58:22 +0100 Subject: [PATCH 2/4] =?UTF-8?q?feat=20=E2=9C=A8:=20Add=20logic=20to=20upda?= =?UTF-8?q?te=20PR=20comments=20and=20labels=20based=20on=20CI=20results?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces new functionality that updates pull request comments and labels automatically based on the outcomes of continuous integration tests. This enhances the efficiency and visibility of the review process by providing immediate feedback directly within the PR interface. --- .gitea/workflows/pr-check.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitea/workflows/pr-check.yaml b/.gitea/workflows/pr-check.yaml index 3e2e308..ea46251 100644 --- a/.gitea/workflows/pr-check.yaml +++ b/.gitea/workflows/pr-check.yaml @@ -147,6 +147,12 @@ jobs: -H "Content-Type: application/json" \ -d "{\"body\":\"\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 PR_STATE=$(curl -s -H "Authorization: token $TOKEN" "$API/pulls/$PR" | jq -r '.state') if [ "$PR_STATE" = "closed" ]; then From c5e6c2a431a22e14c1e759be19fa604d93eb4ca2 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 12:01:33 +0100 Subject: [PATCH 3/4] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Remove=20'?= =?UTF-8?q?ci-pass'=20label=20and=20update=20comment=20on=20PR=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactored the PR check process by removing the 'ci-pass' label and updating the associated comment to reflect the new workflow. --- .gitea/workflows/pr-check.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 \ From af107ca1ee34c8978b1c6cd90302838cb13610a2 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 12:06:48 +0100 Subject: [PATCH 4/4] =?UTF-8?q?style=20=F0=9F=92=8E:=20Remove=20unnecessar?= =?UTF-8?q?y=20blank=20line=20and=20ensure=20consistent=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes any unnecessary blank lines throughout the codebase and ensures that all files follow a consistent formatting style, improving readability and maintainability. --- .gitea/workflows/pr-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/pr-check.yaml b/.gitea/workflows/pr-check.yaml index 1b221a8..b559c00 100644 --- a/.gitea/workflows/pr-check.yaml +++ b/.gitea/workflows/pr-check.yaml @@ -180,7 +180,7 @@ jobs: -d '{"labels":["ci-pass"]}' \ "$API/issues/$PR/labels" fi - + # Reopen PR if closed PR_STATE=$(curl -s -H "Authorization: token $TOKEN" "$API/pulls/$PR" | jq -r '.state') if [ "$PR_STATE" = "closed" ]; then