Skip to content

ci: add PR title conventional commit check#3

Merged
slin1237 merged 1 commit into
mainfrom
setup/pr-title-check
Mar 2, 2026
Merged

ci: add PR title conventional commit check#3
slin1237 merged 1 commit into
mainfrom
setup/pr-title-check

Conversation

@slin1237
Copy link
Copy Markdown
Contributor

@slin1237 slin1237 commented Mar 2, 2026

Summary

Add a GitHub Actions workflow that enforces conventional commit format on PR titles.

Changes

  • .github/workflows/pr-title-check.yml: Runs on PR open/edit/sync/reopen events
    • Validates title matches <type>(<scope>): <description> pattern
    • Accepted types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
    • Uses env: variable binding to avoid GitHub Actions command injection (not inline ${{ }} in run:)
    • Provides clear error message with examples on failure

Adapted from the main SMG repo's pr-title-check.yml.

Test Plan

  • Valid title feat: add something passes regex
  • Invalid title added something fails with helpful error
  • Scoped titles fix(implement): thing pass

Add GitHub Actions workflow that validates PR titles follow the
conventional commits format on open, edit, sync, and reopen events.

Accepted types: feat, fix, docs, style, refactor, perf, test, build,
ci, chore, revert. Optional scope and breaking change indicator supported.

Uses env variable for PR title to avoid GitHub Actions command injection.
Adapted from the main SMG repo's pr-title-check.yml.

Signed-off-by: Simo Lin <[email protected]>
Signed-off-by: Simo Lin <[email protected]>
@slin1237 slin1237 merged commit defb335 into main Mar 2, 2026
2 checks passed
@slin1237 slin1237 deleted the setup/pr-title-check branch March 2, 2026 18:34
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.

1 participant