From 87866059a48e4e5edfc4a5597b3f9dc6e6c3afce Mon Sep 17 00:00:00 2001 From: Jaybe Date: Fri, 14 Nov 2025 21:52:06 +0900 Subject: [PATCH 1/4] =?UTF-8?q?chore(ci):=20auto-merge=20=EB=8B=A8?= =?UTF-8?q?=EA=B3=84=EC=97=90=20'automerge'=20=EB=9D=BC=EB=B2=A8=20?= =?UTF-8?q?=EA=B0=80=EB=93=9C=20=ED=99=95=EC=A0=95=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 4f5e814..a23b789 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -56,6 +56,13 @@ jobs: echo "CI_TOKEN not set; skipping auto-merge"; exit 0; fi OWNER=$(echo "$REPO" | cut -d'/' -f1) NAME=$(echo "$REPO" | cut -d'/' -f2) + echo "Checking labels for PR #$PR_NUMBER on $OWNER/$NAME" + LABELS_JSON=$(curl -sS -X GET \ + -H "Authorization: token ${CI_TOKEN}" \ + "${GITEA_BASE_URL}/api/v1/repos/${OWNER}/${NAME}/issues/${PR_NUMBER}") + if ! echo "$LABELS_JSON" | grep -qi '"name":"automerge"'; then + echo "Label 'automerge' not present; skipping merge"; exit 0; fi + echo "Label 'automerge' present; proceeding to merge" echo "Merging PR #$PR_NUMBER for $OWNER/$NAME" RESP=$(curl -sS -X POST \ -H "Content-Type: application/json" \ -- 2.52.0 From 232321f73e9479cca0c32310f94327560bc9abd9 Mon Sep 17 00:00:00 2001 From: Jaybe Date: Fri, 14 Nov 2025 21:55:39 +0900 Subject: [PATCH 2/4] =?UTF-8?q?chore(ci):=20PR=20=EC=98=A4=ED=94=88/?= =?UTF-8?q?=EB=8F=99=EA=B8=B0=ED=99=94=20=EC=8B=9C=20'automerge'=20?= =?UTF-8?q?=EB=9D=BC=EB=B2=A8=20=EC=9E=90=EB=8F=99=20=EB=B6=80=EC=97=AC=20?= =?UTF-8?q?=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/auto-label.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .gitea/workflows/auto-label.yml diff --git a/.gitea/workflows/auto-label.yml b/.gitea/workflows/auto-label.yml new file mode 100644 index 0000000..f2a4acd --- /dev/null +++ b/.gitea/workflows/auto-label.yml @@ -0,0 +1,28 @@ +name: Auto Label PR + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + add-automerge-label: + runs-on: [macos, host] + steps: + - name: Add 'automerge' label to PR + env: + CI_TOKEN: ${{ secrets.CI_TOKEN }} + GITEA_BASE_URL: https://gitea.jaybe.dev + PR_NUMBER: ${{ github.event.pull_request.number }} + REPO: ${{ github.repository }} + run: | + set -euo pipefail + if [ -z "${CI_TOKEN:-}" ]; then + echo "CI_TOKEN not set; skipping labeling"; exit 0; fi + OWNER=$(echo "$REPO" | cut -d'/' -f1) + NAME=$(echo "$REPO" | cut -d'/' -f2) + echo "Labeling PR #$PR_NUMBER on $OWNER/$NAME with 'automerge'" + curl -sS -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: token ${CI_TOKEN}" \ + "${GITEA_BASE_URL}/api/v1/repos/${OWNER}/${NAME}/issues/${PR_NUMBER}/labels" \ + -d '["automerge"]' || true -- 2.52.0 From 5629607a59d68d599b31128e12716f40aff7243c Mon Sep 17 00:00:00 2001 From: Jaybe Date: Fri, 14 Nov 2025 21:56:22 +0900 Subject: [PATCH 3/4] =?UTF-8?q?chore(ci):=20auto-label=20=EC=9E=AC?= =?UTF-8?q?=ED=8A=B8=EB=A6=AC=EA=B1=B0=20ping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MAIN_PLAN.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAIN_PLAN.md b/MAIN_PLAN.md index 97fa80a..f6d5f35 100644 --- a/MAIN_PLAN.md +++ b/MAIN_PLAN.md @@ -251,3 +251,5 @@ - [ci] automerge 재검증용 ping (2025-11-14 21:36:38) - [ci] auto-pr 라벨 자동부여 재검증 ping (2025-11-14 21:45:14) + +- [ci] auto-label 재트리거 ping (2025-11-14 21:56:22) -- 2.52.0 From b24bfb4af60caf8db165ad722b9c2dd2ba889239 Mon Sep 17 00:00:00 2001 From: Jaybe Date: Fri, 14 Nov 2025 22:01:41 +0900 Subject: [PATCH 4/4] =?UTF-8?q?chore(ci):=20automerge=20=EB=9D=BC=EB=B2=A8?= =?UTF-8?q?=20=EC=88=98=EB=8F=99=EB=B6=80=EC=97=AC=20=ED=9B=84=20=EC=9E=AC?= =?UTF-8?q?=ED=8A=B8=EB=A6=AC=EA=B1=B0=20ping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MAIN_PLAN.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAIN_PLAN.md b/MAIN_PLAN.md index f6d5f35..0accd96 100644 --- a/MAIN_PLAN.md +++ b/MAIN_PLAN.md @@ -253,3 +253,5 @@ - [ci] auto-pr 라벨 자동부여 재검증 ping (2025-11-14 21:45:14) - [ci] auto-label 재트리거 ping (2025-11-14 21:56:22) + +- [ci] automerge 라벨 수동부여 후 재트리거 ping (2025-11-14 22:01:41) -- 2.52.0