From 2ffb46d48732719023ca907a2a5779a2277066a3 Mon Sep 17 00:00:00 2001 From: JeongUk Park Date: Sat, 25 Jul 2026 00:25:14 +0900 Subject: [PATCH] =?UTF-8?q?ci:=20PR=20=EC=BB=A4=EB=B0=8B=20=EB=A9=94?= =?UTF-8?q?=EC=8B=9C=EC=A7=80=20commitlint=20=EA=B2=80=EC=82=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/commitlint.yml | 18 ++++++++++++++++++ .gitignore | 2 ++ commitlint.config.mjs | 18 ++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 .github/workflows/commitlint.yml create mode 100644 commitlint.config.mjs diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..7bfd4f7 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,18 @@ +name: commitlint +on: + pull_request: + types: [opened, reopened, synchronize] + +permissions: + contents: read + pull-requests: read + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + # PR의 모든 커밋 메시지를 conventional commits 규칙으로 검사한다 (commitlint.config.mjs 사용) + - uses: wagoid/commitlint-github-action@v6 diff --git a/.gitignore b/.gitignore index a5b2aed..35c0dd5 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ !/defaults.yaml !/docs/ !/policies/ +!/.github/ +!/commitlint.config.mjs diff --git a/commitlint.config.mjs b/commitlint.config.mjs new file mode 100644 index 0000000..2ad615a --- /dev/null +++ b/commitlint.config.mjs @@ -0,0 +1,18 @@ +// Conventional Commits 1.0.0 기반 + 한글 커밋 메시지 규칙 (조직 공통 설정 — pilot과 동일) +export default { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [ + 2, + 'always', + ['feat', 'fix', 'perf', 'refactor', 'style', 'docs', 'test', 'build', 'ci', 'chore', 'revert'] + ], + 'scope-case': [0], + 'subject-case': [0], + 'subject-max-length': [2, 'always', 50], + 'subject-full-stop': [2, 'never', '.'], + 'header-max-length': [2, 'always', 72], + 'body-leading-blank': [2, 'always'], + 'footer-leading-blank': [2, 'always'] + } +}