feat(pr): add PR title checker to enforce naming conventions#513
feat(pr): add PR title checker to enforce naming conventions#513Miou-zora merged 6 commits intoEngineSquared:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a GitHub Actions workflow and a Python script to validate pull request titles against a Conventional Commit-style pattern ( Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub as GitHub (PR event)
participant Actions as GitHub Actions
participant Container as "python:3.14-slim" container
participant Script as pr_title_check.py
GitHub->>Actions: pull_request opened/edited/synchronize/reopened
Actions->>Container: start job (validate-pr-title)
Container->>Script: set PR_TITLE env and run script
Script->>Script: parse header and summary, validate rules
alt title valid
Script-->>Container: exit 0 (success)
Container-->>Actions: job succeeds
else title invalid
Script-->>Container: emit ::error annotation and exit 1
Container-->>Actions: job fails
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/pr_title_check.yml:
- Line 27: The workflow echoes untrusted PR_TITLE directly into GitHub Actions
workflow commands (the echo that emits ::error), which risks command injection;
update the echo calls that reference PR_TITLE to either wrap the user-controlled
output with GitHub Actions stop-commands (emit ::stop-commands:: before printing
the raw title and ::start-commands:: after) or remove the title from the ::error
payload entirely so no unescaped user input is passed to the ::error command;
locate the echo lines that interpolate PR_TITLE and replace them with the
stop-commands approach or a safe static message.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fdd7a75e-ee49-4bb5-993a-0d49bbd4a021
📒 Files selected for processing (1)
.github/workflows/pr_title_check.yml
|



Pull Request
Description
This PR introduces add workflow to validate pull request title format
Related Issues
Fixes #150
Type of Change
Please delete options that are not relevant.
Changes Made
List the main changes in this PR:
Testing
Describe the tests you ran to verify your changes:
xmake test)clang-format)Test Environment
Screenshots/Videos (if applicable)
Add screenshots or videos to help explain your changes.
Documentation
Checklist
Breaking Changes
If this PR introduces breaking changes, describe them here and provide migration instructions.
Additional Notes
Any additional information that reviewers should know.
Summary by CodeRabbit