chore(infra): set up branch+PR workflow with pre-commit and CI lint#1
chore(infra): set up branch+PR workflow with pre-commit and CI lint#1
Conversation
Hooks cover whitespace hygiene, large-file guard, YAML/JSON syntax, markdownlint-cli2 for prose style, and conventional-pre-commit enforcing the repo commit-message convention. Configuration relaxes a few markdownlint rules (MD013, MD033, MD041) that conflict with our frontmatter, tables, and inline HTML usage. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
One CI workflow running pre-commit across all files on pull requests and main pushes, plus a PR-title job that enforces Conventional Commits via amannn/action-semantic-pull-request using the repository's declared type and scope lists. Concurrency cancels superseded runs on the same ref. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Document that every change lands through a feature branch and pull request (no direct commits to main), that CodeRabbit auto-reviews each PR, and that squash merge is preferred so PR titles become the main history. Add a setup section for pre-commit and list required PR checklist items. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughEstablishes GitHub Actions CI/CD workflow with linting and PR title validation, introduces pre-commit hooks for code quality and commit message standards, enables Markdown linting, and updates documentation to reflect new developer workflow requirements and standards. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 41-79: Update the GitHub Action invocation for the pr-title job to
use the newer release by changing the uses reference from
amannn/action-semantic-pull-request@v5 to
amannn/action-semantic-pull-request@v6.1.1; ensure the step under the pr-title
job that sets env/GITHUB_TOKEN and the with inputs (types, scopes, requireScope,
subjectPattern, subjectPatternError) are preserved and remain compatible with
v6.1.1, then run the workflow locally or trigger CI to confirm no input name
changes break the job.
In @.pre-commit-config.yaml:
- Around line 29-40: The commit hook args list includes additional conventional
commit types "--strict", "ci", "build", and "perf" (the args entries: --strict,
feat, fix, docs, refactor, test, chore, style, ci, build, perf) that are not
documented in CONTRIBUTING.md; update the Type table in CONTRIBUTING.md to
include the missing types "ci", "build", and "perf" (and any mention of --strict
if relevant) so the documented allowed types match the args list in
.pre-commit-config.yaml and avoid confusion for contributors.
In `@00_meta/WORKFLOW.md`:
- Line 71: Resolve the contradiction between the two workflow rules by either
removing the exception that allows direct commits for typo/link fixes or
clarifying the PR-only rule to explicitly permit that exception; specifically,
update the wording of the rule that reads "모든 변경은 feature 브랜치 → Pull Request 를
통해 머지. `main` 직접 커밋 금지" to append a clear exception for "오탈자·링크 수정은 `main` 직접 커밋
허용" or delete the exception sentence "오탈자·링크 수정은 `main` 직접 커밋 허용" so both
statements are consistent throughout the document.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 2bdaf488-8b75-44f7-992f-4c21060d8f03
📒 Files selected for processing (6)
.github/workflows/ci.yml.markdownlint.yaml.pre-commit-config.yaml00_meta/WORKFLOW.mdCONTRIBUTING.mdREADME.md
| 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. |
There was a problem hiding this comment.
🧩 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:
- 1: https://github.com/amannn/action-semantic-pull-request
- 2: https://github.com/amannn/action-semantic-pull-request/releases
- 3: https://github.com/amannn/action-semantic-pull-request/tree/refs/heads/main
- 4: https://github.com/marketplace/actions/semantic-pull-request
- 5: https://github.com/amannn/action-semantic-pull-request/blob/master/CHANGELOG.md
Update amannn/action-semantic-pull-request to 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
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/ci.yml around lines 41 - 79, Update the GitHub Action
invocation for the pr-title job to use the newer release by changing the uses
reference from amannn/action-semantic-pull-request@v5 to
amannn/action-semantic-pull-request@v6.1.1; ensure the step under the pr-title
job that sets env/GITHUB_TOKEN and the with inputs (types, scopes, requireScope,
subjectPattern, subjectPatternError) are preserved and remain compatible with
v6.1.1, then run the workflow locally or trigger CI to confirm no input name
changes break the job.
| args: | ||
| - --strict | ||
| - feat | ||
| - fix | ||
| - docs | ||
| - refactor | ||
| - test | ||
| - chore | ||
| - style | ||
| - ci | ||
| - build | ||
| - perf |
There was a problem hiding this comment.
Type list mismatch with documentation.
The conventional-pre-commit hook allows ci, build, and perf types (lines 38-40), but CONTRIBUTING.md (lines 78-87) only documents feat, fix, docs, refactor, test, chore, and style. This inconsistency may confuse contributors.
📝 Suggested fix: Add missing types to CONTRIBUTING.md
Add to the Type table in CONTRIBUTING.md:
| `chore` | 설정·의존성·CI 등 유지보수 |
| `style` | 포맷팅만 |
+| `ci` | CI/CD 파이프라인 변경 |
+| `build` | 빌드 시스템·외부 의존성 변경 |
+| `perf` | 성능 개선 |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.pre-commit-config.yaml around lines 29 - 40, The commit hook args list
includes additional conventional commit types "--strict", "ci", "build", and
"perf" (the args entries: --strict, feat, fix, docs, refactor, test, chore,
style, ci, build, perf) that are not documented in CONTRIBUTING.md; update the
Type table in CONTRIBUTING.md to include the missing types "ci", "build", and
"perf" (and any mention of --strict if relevant) so the documented allowed types
match the args list in .pre-commit-config.yaml and avoid confusion for
contributors.
|
|
||
| ## Commit / PR 규칙 | ||
|
|
||
| - **모든 변경은 feature 브랜치 → Pull Request 를 통해 머지**. `main` 직접 커밋 금지. |
There was a problem hiding this comment.
Potential conflict with existing rule on line 66.
Line 71 states "모든 변경은 feature 브랜치 → Pull Request 를 통해 머지. main 직접 커밋 금지" (all changes via PR, no direct main commits), but line 66 (existing, unchanged) states "오탈자·링크 수정은 main 직접 커밋 허용" (typo/link fixes allowed directly to main). These rules contradict each other.
Consider either:
- Removing the exception on line 66 to enforce strict PR-only workflow
- Clarifying line 71 to note the typo/link exception
🧰 Tools
🪛 LanguageTool
[grammar] ~71-~71: Ensure spelling is correct
Context: ... / PR 규칙 - 모든 변경은 feature 브랜치 → Pull Request 를 통해 머지. main 직접 커밋 금지. - 커밋 메시지는 [...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@00_meta/WORKFLOW.md` at line 71, Resolve the contradiction between the two
workflow rules by either removing the exception that allows direct commits for
typo/link fixes or clarifying the PR-only rule to explicitly permit that
exception; specifically, update the wording of the rule that reads "모든 변경은
feature 브랜치 → Pull Request 를 통해 머지. `main` 직접 커밋 금지" to append a clear exception
for "오탈자·링크 수정은 `main` 직접 커밋 허용" or delete the exception sentence "오탈자·링크 수정은
`main` 직접 커밋 허용" so both statements are consistent throughout the document.
Summary
main).pre-commithooks for markdown style, commit-message convention, and basic hygiene.pre-commiton every PR / push and lints the PR title for Conventional Commits compliance.CONTRIBUTING/WORKFLOW/READMEaccordingly.Why
CodeRabbit is already wired in on this repo. The remaining gap was (1) not requiring PRs at all, and (2) no local or CI linting. This PR closes both — CodeRabbit handles review, pre-commit + CI handle mechanical checks.
Changes
.pre-commit-config.yaml.markdownlint.yaml.github/workflows/ci.ymllintjob (pre-commit on all files) +pr-titlejob (semantic PR title)CONTRIBUTING.md00_meta/WORKFLOW.mdREADME.mdTest plan
lintjob passes (pre-commit run --all-files)pr-titlejob passes (this PR title follows Conventional Commits)pre-commit install && pre-commit install --hook-type commit-msg && pre-commit run --all-filessucceedsNotes
mainhistory entry.pre-commit autoupdateand commit the result.Summary by CodeRabbit
Chores
Documentation