-
Notifications
You must be signed in to change notification settings - Fork 0
chore(infra): set up branch+PR workflow with pre-commit and CI lint #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint (pre-commit) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
| cache: pip | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" | ||
|
|
||
| - name: Install pre-commit | ||
| run: pip install pre-commit | ||
|
|
||
| - name: Run pre-commit | ||
| run: pre-commit run --all-files --show-diff-on-failure --color always | ||
|
|
||
| pr-title: | ||
| name: Lint PR title | ||
| if: github.event_name == 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: read | ||
| steps: | ||
| - uses: amannn/action-semantic-pull-request@v5 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| types: | | ||
| feat | ||
| fix | ||
| docs | ||
| refactor | ||
| test | ||
| chore | ||
| style | ||
| ci | ||
| build | ||
| perf | ||
| scopes: | | ||
| meta | ||
| adr | ||
| research | ||
| product | ||
| design | ||
| arch | ||
| agents | ||
| backend | ||
| frontend | ||
| eval | ||
| infra | ||
| requireScope: false | ||
| subjectPattern: "^[a-z].+[^.]$" | ||
| subjectPatternError: | | ||
| PR title subject must start with a lowercase letter, | ||
| be non-empty, and not end with a period. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # markdownlint rules — see https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md | ||
| default: true | ||
|
|
||
| # Line length — we use tables and long prose; rely on editor soft-wrap | ||
| MD013: false | ||
|
|
||
| # Inline HTML — allowed (mermaid, details, badges) | ||
| MD033: false | ||
|
|
||
| # First line should be H1 — we use YAML frontmatter first | ||
| MD041: false | ||
|
|
||
| # Duplicate heading text allowed under different parent headings | ||
| MD024: | ||
| siblings_only: true | ||
|
|
||
| # Bare URLs allowed (footnotes/references) | ||
| MD034: false | ||
|
|
||
| # Bold-as-heading allowed for emphasis within lists | ||
| MD036: false | ||
|
|
||
| # Allow inline code blocks without language in quick notes | ||
| MD040: false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Synapse — pre-commit hooks | ||
| # Install: pipx install pre-commit && pre-commit install && pre-commit install --hook-type commit-msg | ||
| # Update: pre-commit autoupdate | ||
| # Run all: pre-commit run --all-files | ||
|
|
||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v5.0.0 | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| - id: end-of-file-fixer | ||
| - id: check-added-large-files | ||
| args: ["--maxkb=5000"] | ||
| - id: check-merge-conflict | ||
| - id: check-yaml | ||
| - id: check-json | ||
| exclude: ^\.vscode/ | ||
|
|
||
| - repo: https://github.com/DavidAnson/markdownlint-cli2 | ||
| rev: v0.17.2 | ||
| hooks: | ||
| - id: markdownlint-cli2 | ||
|
|
||
| - repo: https://github.com/compilerla/conventional-pre-commit | ||
| rev: v3.6.0 | ||
| hooks: | ||
| - id: conventional-pre-commit | ||
| stages: [commit-msg] | ||
| args: | ||
| - --strict | ||
| - feat | ||
| - fix | ||
| - docs | ||
| - refactor | ||
| - test | ||
| - chore | ||
| - style | ||
| - ci | ||
| - build | ||
| - perf | ||
|
Comment on lines
+29
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Type list mismatch with documentation. The 📝 Suggested fix: Add missing types to CONTRIBUTING.mdAdd to the Type table in | `chore` | 설정·의존성·CI 등 유지보수 |
| `style` | 포맷팅만 |
+| `ci` | CI/CD 파이프라인 변경 |
+| `build` | 빌드 시스템·외부 의존성 변경 |
+| `perf` | 성능 개선 |🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,14 +68,17 @@ last_updated: 2026-04-24 | |
|
|
||
| ## Commit / PR 규칙 | ||
|
|
||
| - **모든 변경은 feature 브랜치 → Pull Request 를 통해 머지**. `main` 직접 커밋 금지. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential conflict with existing rule on line 66. Line 71 states "모든 변경은 feature 브랜치 → Pull Request 를 통해 머지. Consider either:
🧰 Tools🪛 LanguageTool[grammar] ~71-~71: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) 🤖 Prompt for AI Agents |
||
| - 커밋 메시지는 [Conventional Commits](https://www.conventionalcommits.org/) — `type(scope): subject` 형식, **영문**. | ||
| - 예: `docs(product): add vision v0.1`, `docs(arch): propose embedding model RFC` | ||
| - PR 제목도 같은 형식. 본문에 **무엇을·왜** 변경했는지 기록. | ||
| - 자세한 형식·Type·Scope 표는 [CONTRIBUTING](../CONTRIBUTING.md#커밋-메시지-규칙) 참고. | ||
| - PR 제목도 같은 형식 (CI 에서 검증). 본문에 **무엇을·왜** 변경했는지 기록. | ||
| - [CodeRabbit](https://coderabbit.ai/) 이 PR 을 자동 리뷰. Squash merge 권장. | ||
| - 자세한 형식·Type·Scope 표·개발 세팅은 [CONTRIBUTING](../CONTRIBUTING.md) 참고. | ||
| - PR 체크리스트: | ||
| - [ ] frontmatter 업데이트 (`last_updated`, 필요 시 `status`/`version`) | ||
| - [ ] 링크 깨짐 확인 | ||
| - [ ] 관련 ADR·RFC 교차 참조 | ||
| - [ ] `pre-commit run --all-files` 통과 | ||
|
|
||
| ## ADR (Architecture Decision Record) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
amannn/action-semantic-pull-request latest version 2025💡 Result:
The latest version of amannn/action-semantic-pull-request is v6.1.1, released on August 22, 2025.
Citations:
Update
amannn/action-semantic-pull-requestto v6.1.1.The action configuration (types, scopes, subjectPattern) properly enforces Conventional Commits and aligns with project standards. However, v5 is outdated; the latest version is v6.1.1 (released August 22, 2025).
🤖 Prompt for AI Agents