From 18e0ed96eae8a545ecf54f6ac96ab25116eb7569 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 11:09:55 +0100 Subject: [PATCH 1/2] =?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: -- 2.52.0 From 5ff377223ad3b347648f1bd9014d0b9f3770810d Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 11:58:22 +0100 Subject: [PATCH 2/2] =?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 -- 2.52.0