-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[ci] Add automated PR title check (#13867) #13868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
8fb20ef to
f702115
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #13868 +/- ##
=======================================
Coverage 31.11% 31.11%
=======================================
Files 2920 2920
Lines 193545 193545
Branches 39497 39499 +2
=======================================
+ Hits 60221 60227 +6
+ Misses 133324 133318 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1c222ef to
2cb4539
Compare
b654cb2 to
4314aeb
Compare
There was a problem hiding this 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 validation of pull request titles using a GitHub Actions workflow. The workflow enforces that PR titles follow the format [component] Message (#issuenumber) as specified in the CONTRIBUTING.md file.
Changes:
- Adds a new GitHub Actions workflow that triggers on PR open/edit events
- Uses the
Slashgear/action-check-pr-titleaction to validate PR title format - Provides a help message pointing to contribution guidelines
| steps: | ||
| - uses: Slashgear/action-check-pr-title@161cede0311ec624ae3ee76a2c27522f7b6fa2d8 | ||
| with: | ||
| regexp: "[[a-z]]+.+(#[0-9]+)" |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regex pattern has incorrect syntax. [[a-z]] should be \[[a-z] to match a literal opening bracket followed by lowercase letters. The pattern also doesn't match the closing bracket or validate the full format. A correct pattern would be: ^\[([a-z\-]+)\]\s+.+\s+\(#[0-9]+\)$ to match [component] Message (#issuenumber). The current pattern would incorrectly accept strings like [abc.
| regexp: "[[a-z]]+.+(#[0-9]+)" | |
| regexp: "^\\[([a-z\\-]+)\\]\\s+.+\\s+\\(#[0-9]+\\)$" |
|
|
||
| jobs: | ||
| check-pr-title-convention: | ||
| name: Check that title follow convention |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammatical error in workflow step name. Should be 'follows' instead of 'follow' to match subject-verb agreement.
| name: Check that title follow convention | |
| name: Check that title follows convention |
| pull_request_target: | ||
| types: [opened, edited] |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using pull_request_target trigger can be a security risk as it runs in the context of the base repository with access to secrets, even for PRs from forks. While the current permissions are set to contents: read which limits the risk, this trigger should only be used when necessary. Since this workflow doesn't need to post comments or access secrets (it just validates the title), using only pull_request trigger should be sufficient. If pull_request_target is needed for fork PRs, ensure this is intentional and documented.
| pull_request_target: | |
| types: [opened, edited] |
Proposed changes
Related issues
Checklist
Further comments