Skip to content

ci(github): add PR title validation workflow#6

Merged
kimchanhyung98 merged 10 commits intomainfrom
copilot/add-pr-title-check-workflow
Jan 2, 2026
Merged

ci(github): add PR title validation workflow#6
kimchanhyung98 merged 10 commits intomainfrom
copilot/add-pr-title-check-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 1, 2026

Adds GitHub Actions workflow for automatic PR title validation using conventional commit format.

Changes

  • Add .github/workflows/pr-title-check.yml using amannn/action-semantic-pull-request@v5
  • Trigger on pull_request events: opened, edited, synchronize
  • Set explicit permissions: pull-requests: read for minimal privilege

Workflow

name: "Check PR title format"

on:
  pull_request:
    types: [opened, edited, synchronize]

permissions:
  pull-requests: read

jobs:
  semantic-pull-request:
    runs-on: ubuntu-latest
    steps:
      - name: Check PR title
        uses: amannn/action-semantic-pull-request@v5
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

PRs with non-conforming titles will show a failing status check.

Original prompt

This section details on the original issue you should resolve

<issue_title>PR 제목 자동 검증 action/workflow 추가</issue_title>
<issue_description>PR(Pull Request) 생성 또는 업데이트 시 자동으로 제목 규칙을 확인하는 GitHub Action 또는 workflow를 프로젝트에 도입합니다.

적용 방법

  • conventional commit, 혹은 팀 내 규칙에 기반한 PR 제목 자동 검사
  • 추천 Action: amannn/action-semantic-pull-request 활용
    • PR 생성 시, 워크플로우가 실행되어 제목 형식 체크
    • 규칙 위반 시 PR에 status check 실패 표시 및 알림
  • .github/workflows/pr-title-check.yml 등 워크플로우 추가

예시 Workflow (semantic-pull-request)

name: "Check PR title format"
on:
  pull_request:
    types: [opened, edited, synchronize]

jobs:
  semantic-pull-request:
    runs-on: ubuntu-latest
    steps:
      - name: Check PR title
        uses: amannn/action-semantic-pull-request@v5
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  • 필요 시 추가 규칙/옵션 적용 가능: 예시로 팀에서 사용하는 키워드, prefix, JIRA-ticket 패턴 등
  • 프로젝트 README에 PR 제목 규칙 및 적용 방법 문서화 (예: "PR 제목은 반드시 Conventional Commit 스타일 준수 또는 '[TYPE] ...' 형태로 작성")

모든 워크플로우/액션 설정은 별도 PR로 관리하며, 도입방법은 팀 의견에 따라 조정 가능. 추가 요청사항이 있으면 의견 남겨주세요.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Summary by CodeRabbit

  • Documentation

    • Added comprehensive pull request contributor guide with Conventional Commits format standards and examples.
    • Updated pull request template with formatting guidelines.
  • Chores

    • Implemented automated PR title validation workflow using GitHub Actions to enforce Conventional Commits conventions.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 1, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

This PR adds automated PR title validation infrastructure by introducing a GitHub Actions workflow that enforces Conventional Commits format for all pull requests, complemented by contributor documentation explaining the naming conventions and providing usage examples.

Changes

Cohort / File(s) Summary
Documentation & Contributor Guidance
​.github/pull-request-guide.md, ​.github/pull_request_template.md
Added comprehensive PR title conventions documentation defining type/scope format (<type>(<scope>): <description>), rules for lowercase start and imperative mood, categorized type definitions (feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert), scope groupings, and example patterns. Updated PR template with Conventional Commits guidance block.
PR Title Validation Workflow
​.github/workflows/pr-title-check.yml
Introduced GitHub Actions workflow using amannn/action-semantic-pull-request@v6 that validates PR titles on pull_request_target events (opened, edited, synchronize, labeled, unlabeled). Enforces allowed commit types, requires scopes, disallows uppercase/multiple scopes, enables WIP support, skips validation for bot/ignore labels, and applies subjectPattern regex requiring lowercase start.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit hops through PRs with delight,
Checking titles fit the Conventional format right,
feat and fix in lowercase, with scope so neat,
No more title chaos—validation's complete!

Pre-merge checks

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci(github): add PR title validation workflow' directly and accurately describes the main change—adding a CI workflow for PR title validation using Conventional Commits format.
Linked Issues check ✅ Passed The PR fully implements all coding requirements from issue #5: adds the pr-title-check.yml workflow using amannn/action-semantic-pull-request, configures Conventional Commit validation with required scopes and types, documents PR title rules in pull-request-guide.md and pull_request_template.md.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #5 objectives: the workflow file, PR template updates, and contributor guide are all in scope for implementing PR title validation and documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits January 1, 2026 06:27
Co-authored-by: kimchanhyung98 <60088641+kimchanhyung98@users.noreply.github.com>
Co-authored-by: kimchanhyung98 <60088641+kimchanhyung98@users.noreply.github.com>
Copilot AI changed the title [WIP] Add workflow to automatically validate PR title Add PR title validation workflow Jan 1, 2026
Copilot AI requested a review from kimchanhyung98 January 1, 2026 06:29
- Add GitHub Actions workflow (pr-title-check.yml)
  - Validate PR titles using Conventional Commits format
  - Require scope for all PRs
  - Allowed types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
  - Subject must start with lowercase
- Add PR template (pull_request_template.md)
  - Include type and scope examples
  - Common scopes: user, product, order, payment, auth, api, database, etc.
- Add Korean PR guide (pull-request-guide.md)
  - Type descriptions table
  - Scope descriptions table
  - Title formatting rules and examples

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@kimchanhyung98 kimchanhyung98 marked this pull request as ready for review January 1, 2026 16:14
Copilot AI review requested due to automatic review settings January 1, 2026 16:14
@kimchanhyung98
Copy link
Copy Markdown
Owner

@coderabbitai review
/gemini review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 1, 2026

@kimchanhyung98: I'll review the changes in this PR for you.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Starting a code review as requested. Please wait a moment while I analyze the changes.

@kimchanhyung98 kimchanhyung98 changed the title Add PR title validation workflow ci(github): add PR title validation workflow Jan 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds automated PR title validation using GitHub Actions to enforce Conventional Commits format. The implementation goes beyond the minimal specification in the PR description by adding comprehensive configuration options, supporting WIP PRs, and providing bilingual documentation.

Key changes:

  • Workflow configured with v6 of the semantic PR action (vs v5 in description) with enhanced validation rules including required scopes, lowercase enforcement, and label-based exceptions
  • Comprehensive documentation added in both English (PR template) and Korean (PR guide) with detailed type/scope references and examples

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
.github/workflows/pr-title-check.yml Implements PR title validation with conventional commit enforcement, scope requirements, and configurable ignore patterns
.github/pull_request_template.md Provides inline PR template with format guidance, type/scope examples for contributors
.github/pull-request-guide.md Comprehensive Korean documentation detailing PR title rules, types, scopes, and examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/pull-request-guide.md
Comment thread .github/workflows/pr-title-check.yml Outdated
Comment thread .github/workflows/pr-title-check.yml
Comment thread .github/workflows/pr-title-check.yml Outdated
Comment thread .github/workflows/pr-title-check.yml
Comment thread .github/workflows/pr-title-check.yml
Comment thread .github/pull_request_template.md Outdated
Comment thread .github/pull-request-guide.md
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/pull-request-guide.md (1)

39-45: Add language identifier to the fenced code block.

The code block is missing a language identifier. Add an empty string or 'text' after the opening fence to satisfy markdownlint.

Based on static analysis hints from markdownlint-cli2.

🔎 Proposed fix
-```
+```text
 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
</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: defaults

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between af441c2738f242a3dae489d1fee7c09f861893f2 and 25eea78de4588719286f64f4cf216ed5a02a3a1c.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `.github/pull-request-guide.md`
* `.github/pull_request_template.md`
* `.github/workflows/pr-title-check.yml`

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.18.1)</summary>

<details>
<summary>.github/pull-request-guide.md</summary>

39-39: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)</summary>

* GitHub Check: Agent

</details>

<details>
<summary>🔇 Additional comments (5)</summary><blockquote>

<details>
<summary>.github/pull_request_template.md (1)</summary><blockquote>

`1-13`: **LGTM! Clear and consistent PR template.**

The template provides helpful guidance that aligns perfectly with the workflow validation rules. The types, scopes, and examples follow the Conventional Commits format correctly.

</blockquote></details>
<details>
<summary>.github/pull-request-guide.md (1)</summary><blockquote>

`1-45`: **LGTM! Comprehensive PR guide.**

The guide is well-structured and provides clear instructions in Korean. The types, scopes, and examples are all consistent with the workflow validation rules and the PR template.

</blockquote></details>
<details>
<summary>.github/workflows/pr-title-check.yml (3)</summary><blockquote>

`21-59`: **Configuration looks good overall.**

The action configuration correctly enforces the Conventional Commits format with appropriate types, required scopes, WIP support, and lowercase subject requirement. The custom error message is clear and helpful.

---

`42-44`: **Clarify the intent of `disallowScopes` pattern.**

The pattern `[A-Z]+` will disallow any scope containing uppercase letters. However, the comment says "Disallow uppercase scopes and multiple scopes", but this pattern won't catch multiple scopes like `scope1,scope2`.

If the intent is to disallow multiple scopes, consider using a pattern like `.*,.*` instead. If the intent is to disallow uppercase letters in scopes (which aligns with the lowercase requirement), the current pattern is correct but the comment should be updated.



Please clarify the intended behavior:
- Should `user,product` (multiple scopes) be disallowed?
- Should `User` or `USER` (uppercase scope) be disallowed?
- Both?

---

`3-14`: **Security implications of `pull_request_target` are appropriate for this use case.**

The workflow safely uses `pull_request_target` because `amannn/action-semantic-pull-request@v6` only validates the PR title without executing or checking out any code from the pull request. The write permissions for `pull-requests` and `statuses` are necessary to post validation status checks and comments on PRs from forks, which requires `pull_request_target` instead of `pull_request`.

Consider documenting this security design decision (why `pull_request_target` is safe here) for future maintainers, as it helps clarify that this is intentional and safe.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

kimchanhyung98 and others added 5 commits January 2, 2026 12:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Introduces a .github/dependabot.yml file with a basic setup for weekly updates. The package ecosystem is not yet specified and should be configured according to project needs.
Updated the dependabot.yml configuration to specify 'npm' as the package-ecosystem, enabling automated dependency updates for npm packages.
@kimchanhyung98 kimchanhyung98 merged commit 512415e into main Jan 2, 2026
4 checks passed
@kimchanhyung98 kimchanhyung98 deleted the copilot/add-pr-title-check-workflow branch January 2, 2026 04:13
kimchanhyung98 added a commit that referenced this pull request Mar 19, 2026
- P1: After 예시에서 날조된 출처/수치 제거 (KO #4, #5, #6)
- P2: 존댓말 보존 조건 추가 (KO #9)
- P2: 절차적 목록 보존 주의사항 추가 (KO #15, EN #15)
- P2: 중립 톤 보존 조건 추가 (EN PERSONALITY AND SOUL)
- version 필드 제거 (프로젝트 컨벤션 통일)
- KO Reference 섹션 추가 (출처 명확화)
- KO #18 아첨조 After를 실제 예시로 교체

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR 제목 자동 검증 action/workflow 추가

3 participants