-
Notifications
You must be signed in to change notification settings - Fork 1
ci(github): add PR title validation workflow #6
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
48ec376
Initial plan
Copilot 8e41e05
Add PR title check workflow using semantic-pull-request action
Copilot 235c9d4
Add explicit permissions to PR title check workflow for security
Copilot 25eea78
chore(github): add PR title validation and templates
kimchanhyung98 e44f427
Merge branch 'main' into copilot/add-pr-title-check-workflow
kimchanhyung98 a5f4f82
fix(copilot): update .github/workflows/pr-title-check.yml
kimchanhyung98 4a45ec4
fix(copilot): update .github/workflows/pr-title-check.yml
kimchanhyung98 0cc15e1
fix(copilot): update .github/pull_request_template.md
kimchanhyung98 bfab1d6
feat(github): Add initial Dependabot configuration
kimchanhyung98 ef5b924
fix(config): Set package-ecosystem to npm in dependabot config
kimchanhyung98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # To get started with Dependabot version updates, you'll need to specify which | ||
| # package ecosystems to update and where the package manifests are located. | ||
| # Please see the documentation for all configuration options: | ||
| # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
|
||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "" # See documentation for possible values | ||
| directory: "/" # Location of package manifests | ||
| schedule: | ||
| interval: "weekly" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Pull Request 작성 가이드 | ||
|
|
||
| 제목 형식 : `<type>(<scope>): <description>` | ||
|
|
||
| ## 규칙 | ||
|
|
||
| - **소문자**로 시작 | ||
| - **명령형 현재 시제** 사용 (add, 과거형 added가 아님) | ||
| - 마침표 **없음** | ||
| - **50자 이내** 권장 | ||
|
kimchanhyung98 marked this conversation as resolved.
|
||
|
|
||
| ## 🏷️ Types | ||
|
|
||
| | Type | 설명 | 예시 | | ||
| |------------|-----------|-----------------------------------------------| | ||
| | `feat` | 새로운 기능 추가 | `feat(user): add email verification` | | ||
| | `fix` | 버그 수정 | `fix(payment): resolve timeout error` | | ||
| | `docs` | 문서 변경 | `docs(api): add OpenAPI spec` | | ||
| | `style` | 코드 스타일 변경 | `style(user): format with prettier` | | ||
| | `refactor` | 코드 리팩토링 | `refactor(order): extract calculation logic` | | ||
| | `test` | 테스트 추가/수정 | `test(user): add authentication tests` | | ||
| | `chore` | 기타 변경사항 | `chore(deps): upgrade Laravel to 12.1` | | ||
| | `perf` | 성능 개선 | `perf(database): optimize user query` | | ||
| | `ci` | CI/CD 변경 | `ci(github): add deployment workflow` | | ||
| | `build` | 빌드 시스템 변경 | `build(docker): update PHP to 8.5` | | ||
| | `revert` | 이전 커밋 되돌리기 | `revert(payment): revert payment feature` | | ||
|
|
||
| ## 🎯 Scopes | ||
|
|
||
| | Scope | 설명 | | ||
| |-----------------------------------------|---------| | ||
| | `user`, `product`, `order`, `payment` | 도메인 관련 | | ||
| | `auth`, `api`, `database`, `middleware` | 컴포넌트 관련 | | ||
| | `service`, `controller`, `model` | 레이어 관련 | | ||
| | `docker`, `deps`, `config`, `github` | 인프라 관련 | | ||
|
|
||
| ## 예시 | ||
|
|
||
| ``` | ||
| feat(user): add email verification | ||
| fix(payment): resolve timeout error | ||
| refactor(order): extract calculation logic | ||
| docs(api): add OpenAPI specification | ||
| chore(deps): upgrade Laravel to 12.1 | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <!-- | ||
| ## PR Title Format | ||
| Please ensure your PR title follows the Conventional Commits format: | ||
| <type>(<scope>): <description> | ||
|
|
||
| Types: feat, fix, docs, refactor, test, chore, perf, ci, build, style, revert | ||
| Example scopes (recommendations only; any lowercase scope is accepted by CI): user, product, order, payment, auth, api, database, middleware, service, controller, model, docker, deps, config, github | ||
|
|
||
| Examples: | ||
| - feat(user): add social login support | ||
| - fix(payment): resolve duplicate transaction issue | ||
| - refactor(user): extract service layer from controllers | ||
| --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| name: "Lint PR" | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - edited | ||
| - synchronize | ||
| - labeled | ||
| - unlabeled | ||
|
kimchanhyung98 marked this conversation as resolved.
|
||
|
|
||
| permissions: | ||
| pull-requests: read | ||
| statuses: write | ||
|
|
||
| jobs: | ||
| main: | ||
| name: Validate PR title | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: amannn/action-semantic-pull-request@v6 | ||
|
kimchanhyung98 marked this conversation as resolved.
|
||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| # Configure which types are allowed (Conventional Commits spec) | ||
| types: | | ||
| feat | ||
| fix | ||
| docs | ||
| style | ||
| refactor | ||
| perf | ||
| test | ||
| build | ||
| ci | ||
| chore | ||
| revert | ||
|
|
||
| # Scope is required for all PRs | ||
| requireScope: true | ||
|
|
||
| # Disallow uppercase scopes and multiple scopes | ||
|
kimchanhyung98 marked this conversation as resolved.
|
||
| disallowScopes: | | ||
| [A-Z]+ | ||
|
|
||
| # Work in progress PR support | ||
| wip: true | ||
|
|
||
| # Skip validation for PRs with these labels | ||
| ignoreLabels: | | ||
| bot | ||
| ignore-semantic-pull-request | ||
|
|
||
| # Ensure the subject doesn't start with an uppercase character | ||
| subjectPattern: ^[a-z].*$ | ||
| subjectPatternError: | | ||
| The subject "{subject}" found in the pull request title "{title}" | ||
| didn't match the configured pattern. Please ensure that the subject | ||
| starts with a lowercase character. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.