From 43a6468c870f5c4d3c1330dc2c5e9315e47c0b48 Mon Sep 17 00:00:00 2001 From: ohhalim Date: Thu, 14 May 2026 16:32:56 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20ci=20=ED=8C=8C=EC=9D=B4=ED=94=84?= =?UTF-8?q?=EB=9D=BC=EC=9D=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-create-branch.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-create-branch.yml b/.github/workflows/auto-create-branch.yml index b3b09d3..a864086 100644 --- a/.github/workflows/auto-create-branch.yml +++ b/.github/workflows/auto-create-branch.yml @@ -38,13 +38,19 @@ jobs: const body = issue.body || ''; const labels = (issue.labels || []).map(l => l.name.toLowerCase()); - // 1) type 결정 (우선순위: hotfix > release > refactor > fix > chore > feat) + // 1) type 결정 (우선순위: hotfix > release > refactor > fix > setting > chore > feat) + // 라벨이 없거나 적용되지 않은 경우 이슈 템플릿 제목([Refactor]: 등)을 fallback으로 사용한다. + const title = issue.title || ''; + const titleTypeMatch = title.match(/^\[(hotfix|release|refactor|fix|setting|chore|feat)\]\s*:/i); + let type = 'feat'; if (labels.includes('hotfix')) type = 'hotfix'; else if (labels.includes('release')) type = 'release'; else if (labels.includes('refactor')) type = 'refactor'; else if (labels.includes('fix')) type = 'fix'; + else if (labels.includes('setting')) type = 'setting'; else if (labels.includes('chore')) type = 'chore'; + else if (titleTypeMatch) type = titleTypeMatch[1].toLowerCase(); // 2) 이슈 폼에서 Branch Keyword 추출 (### Branch Keyword 다음 줄) const m = body.match(/###\s*Branch Keyword\s*\n([^\n]+)/i);