Add a workflow that checks the PR title - #567
Conversation
Used checks: Exception: titles matching Release/X.Y.Z skip everything. Heuristics • Not empty / whitespace-only • No leading or trailing whitespace • At least 3 words • Not exactly one of: fix, update, wip, test, changes, misc, tmp, temp (case-insensitive) • At least 12 characters Spelling — cspell (https://cspell.org/) v8 • English dictionary (language: en in .github/cspell-pr-title.json (.github/cspell-pr-title.json)) • Extra allowed words: CI, GH, MotionTarget, OOB, PolyScope, PRs, RTDE, RTDEInvalidKeyException, UR, URCap, changelog, changelogs, lyrical, script_reader, stackoverflow, start_ursim, teardown, urcap, ursim Grammar — LanguageTool (https://languagetool.org/) (erikvl87/languagetool Docker, en-US) • Full grammar check, except: • Category TYPOS disabled (spelling left to cspell) • Rules disabled for title-style fragments: WHITESPACE_RULE, EN_QUOTES, DASH_RULE, WORD_CONTAINS_UNDERSCORE, UPPERCASE_SENTENCE_START, ARROWS, COMMA_PARENTHESIS_WHITESPACE, UNLIKELY_OPENING_PUNCTUATION, SENTENCE_WHITESPACE, CURRENCY, EN_UNPAIRED_BRACKETS, PHRASE_REPETITION, PUNCTUATION_PARAGRAPH_END, METRIC_UNITS_EN_US, ENGLISH_WORD_REPEAT_BEGINNING_RULE
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #567 +/- ##
==========================================
- Coverage 81.04% 81.02% -0.03%
==========================================
Files 119 119
Lines 7181 7177 -4
Branches 3220 3220
==========================================
- Hits 5820 5815 -5
- Misses 973 976 +3
+ Partials 388 386 -2 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
🟡 Changes recommended
Tool versions are not consistently controlled, making validation results environment-dependent and potentially unstable.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds CI validation for PR titles used in squash commits and changelogs.
Changes:
- Adds title heuristics, spelling, and grammar checks.
- Exempts versioned release titles.
- Configures project-specific spelling terms.
File summaries
| File | Description |
|---|---|
.github/workflows/check_pr_title.yml |
Runs title validation for PR events. |
.github/cspell-pr-title.json |
Defines spelling configuration and allowed terms. |
.github/check_pr_title.sh |
Implements title validation and reporting. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if ! command -v cspell >/dev/null 2>&1; then | ||
| npm install --global cspell@8 | ||
| fi | ||
| if ! CSPELL_OUT=$(echo "${TITLE}" | cspell --config "${CSPELL_CONFIG}" --no-progress stdin 2>&1); then |
| # --- Grammar (LanguageTool, local Docker) --- | ||
| summary "### Grammar (LanguageTool)" | ||
| docker rm -f languagetool >/dev/null 2>&1 || true | ||
| docker run -d --name languagetool -p 8010:8010 erikvl87/languagetool |
|
Tick the box to add this pull request to the merge queue (same as
|
Since we use the PR titles as commit messages on the master branch and we use those for the changelogs, we would like to make sure they don't contain any obvious mistakes. This PR uses heuristics and spell checking rather than throwing an LLM at it.
Used checks:
Exception: titles matching Release/X.Y.Z skip everything.
Heuristics
• Not empty / whitespace-only
• No leading or trailing whitespace
• At least 3 words
• Not exactly one of: fix, update, wip, test, changes, misc, tmp, temp
(case-insensitive)
• At least 12 characters
Spelling — cspell (https://cspell.org/) v8
• English dictionary (language: en in
.github/cspell-pr-title.json)• Extra allowed words: CI, GH, MotionTarget, OOB, PolyScope, PRs,
RTDE, RTDEInvalidKeyException, UR, URCap, changelog, changelogs, lyrical, script_reader, stackoverflow, start_ursim, teardown, urcap, ursim
Grammar — LanguageTool (https://languagetool.org/) (erikvl87/languagetool Docker, en-US)
• Full grammar check, except:
• Category TYPOS disabled (spelling left to cspell)
• Rules disabled for title-style fragments: WHITESPACE_RULE,
EN_QUOTES, DASH_RULE, WORD_CONTAINS_UNDERSCORE,
UPPERCASE_SENTENCE_START, ARROWS, COMMA_PARENTHESIS_WHITESPACE, UNLIKELY_OPENING_PUNCTUATION, SENTENCE_WHITESPACE, CURRENCY, EN_UNPAIRED_BRACKETS, PHRASE_REPETITION, PUNCTUATION_PARAGRAPH_END, METRIC_UNITS_EN_US, ENGLISH_WORD_REPEAT_BEGINNING_RULE
Note
Low Risk
CI-only gate on PR metadata; no runtime or auth changes, though Docker/cspell install and grammar rules may occasionally block or slow PRs.
Overview
Adds automated PR title validation in CI so titles stay suitable for squash-merge commit messages and changelogs.
A new workflow runs on pull request open, edit, reopen, and sync. It calls
.github/check_pr_title.sh, which writes results to the GitHub step summary. Release/X.Y.Z titles skip all checks.The script enforces heuristics (non-empty, no stray whitespace, ≥3 words, ≥12 characters, denylist for vague one-word titles), spelling via cspell v8 and
.github/cspell-pr-title.json(project terms like URCap, RTDE), and grammar via a local LanguageTool Docker container with typo rules and title-style noise rules disabled.Reviewed by Cursor Bugbot for commit 49ed044. Bugbot is set up for automated code reviews on this repo. Configure here.