ci: Enforce conventional commit format for PR titles#3666
Merged
Conversation
Adds a workflow that fails when a PR title does not match the `<type>(<scope>)?: <Subject>` convention from https://develop.sentry.dev/engineering-practices/commit-messages/. Re-validates on title edits. Can be bypassed with an `ignore-title` label if ever needed. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- Add `impr`, `enh`, `deps`, `refactor`, `tests` (plural) to match the types categorized by `.github/release.yml`. - Allow breaking-change `!` suffix (e.g. `feat!: ...`) consistent with the Breaking Changes pattern in release.yml. - Drop `license` — not recognized by release.yml and rare enough to lose. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to enforce Sentry-style conventional commit formatting for PR titles to keep release automation/changelog categorization consistent.
Changes:
- Introduces a new
PR Titleworkflow that runs on PR title/label events (andmerge_group). - Adds a JS validator that checks PR titles against the types defined in
.github/release.yml, with an opt-out label.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/pr-title.yml | New CI workflow to validate PR titles via actions/github-script. |
| .github/actions/pr-title/index.js | Implements the PR title validation logic and ignore-label behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Document that PR descriptions stay minimal by default and avoid test-plan checklists unless explicitly requested. This keeps /create-pr output concise and aligned with repository expectations. Co-Authored-By: Codex 5.3 <[email protected]> Made-with: Cursor
Updated PR title format to require capitalization.
denrase
approved these changes
Apr 24, 2026
Run title validation directly in github-script, remove the checked-out local JS helper, and validate associated PRs for merge_group events. Also relax subject-case enforcement so updater PR titles like `chore(deps): update ...` continue to pass and map to Dependencies. Co-Authored-By: Codex 5.3 <[email protected]> Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7d75db5. Configure here.
Include the pull_request synchronize event so the PR title workflow reruns when new commits are pushed to an existing pull request. Co-Authored-By: Codex 5.3 <[email protected]> Made-with: Cursor
Drop the ignore-title label escape hatch from the PR title workflow so all non-draft, non-merged PRs are consistently validated. Co-Authored-By: Codex 5.3 <[email protected]> Made-with: Cursor
Update the workflow job name to `Check Conventional PR Title` so the GitHub checks list is more explicit. Co-Authored-By: Codex 5.3 <[email protected]> Made-with: Cursor
Drop merge_group triggering and simplify the script to validate only pull_request payloads. This removes an unnecessary code path and avoids misleading merge_group failure messages. Co-Authored-By: Codex 5.3 <[email protected]> Made-with: Cursor
Require capitalized PR title subjects for human-authored pull requests while allowing lowercase starts for automated bot PRs. Update AGENTS guidance to match the bot exception and keep documented conventions aligned with CI behavior. Co-Authored-By: Codex 5.3 <[email protected]> Made-with: Cursor
This was referenced May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add a CI check that validates PR titles against Sentry's conventional commit format and release categories.
This keeps release automation predictable and prevents malformed titles from being merged.
This is especially important now that we generate changelog entries from PR titles
Inspired from https://github.com/getsentry/relay
Made with Cursor