ci: pr conventional commits validator#353
Conversation
WalkthroughA new GitHub Actions workflow was added to automatically validate pull request titles against conventional commit standards. The workflow triggers on PR lifecycle events targeting the main branch and uses a third-party action to enforce allowed commit types (feat, fix, docs, test, refactor, ci, perf, chore, revert). Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #353 +/- ##
=======================================
Coverage 85.80% 85.80%
=======================================
Files 26 26
Lines 1268 1268
Branches 249 249
=======================================
Hits 1088 1088
Misses 110 110
Partials 70 70 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a dedicated GitHub Actions workflow to enforce Conventional Commit-style PR titles on pull requests targeting main, helping standardize change metadata and keep PR titles consistent across the repo.
Changes:
- Introduces a new
pull_request-triggered workflow that validates PR titles against a configured set of Conventional Commit types. - Pins the third-party validation action to a specific commit SHA and disables auto-labeling.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/pr-title-conventional-commit.yml (1)
3-7: Consider validating PRs targeting all branches.The workflow currently only validates PR titles for pull requests targeting the
mainbranch. If your project uses other long-lived branches (e.g.,develop, release branches), you may want to remove the branch filter to validate all PRs regardless of target branch.📝 Optional: Remove branch restriction
on: pull_request: types: [opened, reopened, synchronize, edited] - branches: - - main🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-title-conventional-commit.yml around lines 3 - 7, The workflow limits PR title validation to PRs targeting main by specifying the pull_request.branches filter; remove the branches key (or adjust it to include other long-lived branches like develop or release/*) so the trigger applies to all target branches—update the pull_request configuration (the on: pull_request types and branches block) to either drop the branches array entirely or add the additional branch patterns you want validated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/pr-title-conventional-commit.yml:
- Around line 3-7: The workflow limits PR title validation to PRs targeting main
by specifying the pull_request.branches filter; remove the branches key (or
adjust it to include other long-lived branches like develop or release/*) so the
trigger applies to all target branches—update the pull_request configuration
(the on: pull_request types and branches block) to either drop the branches
array entirely or add the additional branch patterns you want validated.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 23b202be-b3f0-4412-88b5-e509b47f7b19
📒 Files selected for processing (1)
.github/workflows/pr-title-conventional-commit.yml
Description
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit