chore(ci): auto-merge 단계에 'automerge' 라벨 가드 확정 반영
This commit is contained in:
@@ -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" \
|
||||
|
||||
Reference in New Issue
Block a user