Problem Statement
When using automatic PR naming during merges, the PR name can sometimes be incorrect. Since commit messages on main are based on PR titles (used for mirroring), an incorrectly named PR causes a non-conventional commit to land on main. There is currently no automated check to enforce the PR naming convention.
Proposed Solution
Add a GitHub Actions workflow that validates the PR title against the project's naming convention (currently the same format as issue titles) and fails the check if it does not comply.
Alternative Solutions
- Use a bot (e.g.,
action-semantic-pull-request) from the GitHub Marketplace — quick to set up but adds an external dependency.
- Enforce naming via branch protection rules only — less precise than a dedicated title check.
Use Cases
- Use case 1: A contributor opens a PR with a non-conventional title; CI immediately flags it before merge.
- Use case 2: The merge commit on
main always follows the convention, keeping the mirror history clean.
Impact
- No performance implications.
- New CI workflow file added — no changes to existing code.
- No breaking changes.
Implementation Details (optional)
- Add a workflow triggered on
pull_request (types: opened, edited, synchronize).
- Validate
github.event.pull_request.title against the agreed regex (e.g., ^\[FEATURE\]|^\[BUG\]|^\[TASK\]).
- Fail with a descriptive error message if the title does not match.
Additional Context
N/A
Related Issues
Problem Statement
When using automatic PR naming during merges, the PR name can sometimes be incorrect. Since commit messages on
mainare based on PR titles (used for mirroring), an incorrectly named PR causes a non-conventional commit to land onmain. There is currently no automated check to enforce the PR naming convention.Proposed Solution
Add a GitHub Actions workflow that validates the PR title against the project's naming convention (currently the same format as issue titles) and fails the check if it does not comply.
Alternative Solutions
action-semantic-pull-request) from the GitHub Marketplace — quick to set up but adds an external dependency.Use Cases
mainalways follows the convention, keeping the mirror history clean.Impact
Implementation Details (optional)
pull_request(types:opened,edited,synchronize).github.event.pull_request.titleagainst the agreed regex (e.g.,^\[FEATURE\]|^\[BUG\]|^\[TASK\]).Additional Context
N/A
Related Issues