Skip to content

Add a workflow that checks the PR title - #567

Merged
urfeex merged 1 commit into
UniversalRobots:masterfrom
urfeex:check_pr_title_workflow
Sep 14, 2026
Merged

urfeex merged 1 commit into
UniversalRobots:masterfrom
urfeex:check_pr_title_workflow

Conversation

@urfeex

@urfeex urfeex commented Sep 10, 2026

Copy link
Copy Markdown
Member

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.

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
@urfeex
urfeex requested review from a team and a balanced review from Copilot September 10, 2026 15:53
@urfeex urfeex added the CI label Sep 10, 2026
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.02%. Comparing base (6f1ddc4) to head (49ed044).
⚠️ Report is 3 commits behind head on master.

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     
Flag Coverage Δ
check_version_ur10-3.15.8 12.80% <ø> (+1.36%) ⬆️
check_version_ur10e-10.11.0 11.17% <ø> (ø)
check_version_ur10e-5.15.2 11.21% <ø> (-0.20%) ⬇️
check_version_ur12e-10.12.1 11.17% <ø> (-0.05%) ⬇️
check_version_ur12e-5.25.1 11.17% <ø> (-0.24%) ⬇️
check_version_ur15-10.12.1 11.17% <ø> (-0.05%) ⬇️
check_version_ur15-5.25.1 11.17% <ø> (ø)
check_version_ur16e-10.12.1 11.17% <ø> (ø)
check_version_ur16e-5.25.1 11.17% <ø> (-0.20%) ⬇️
check_version_ur18-10.12.1 11.17% <ø> (ø)
check_version_ur18-5.25.1 11.36% <ø> (ø)
check_version_ur20-10.12.1 11.17% <ø> (ø)
check_version_ur20-5.25.1 11.36% <ø> (ø)
check_version_ur3-3.14.3 11.17% <ø> (-0.05%) ⬇️
check_version_ur30-10.12.1 11.17% <ø> (-0.05%) ⬇️
check_version_ur30-5.25.1 11.17% <ø> (-0.20%) ⬇️
check_version_ur3e-10.11.0 11.17% <ø> (ø)
check_version_ur3e-5.9.4 11.17% <ø> (-0.05%) ⬇️
check_version_ur5-3.15.8 11.92% <ø> (+0.47%) ⬆️
check_version_ur5e-10.11.0 11.17% <ø> (ø)
check_version_ur5e-5.12.8 11.21% <ø> (+0.04%) ⬆️
check_version_ur7e-10.11.0 11.17% <ø> (ø)
check_version_ur7e-5.22.2 11.36% <ø> (ø)
check_version_ur8long-10.12.1 11.17% <ø> (-0.05%) ⬇️
check_version_ur8long-5.25.1 11.77% <ø> (+0.60%) ⬆️
python_scripts 75.90% <ø> (ø)
start_ursim 84.76% <ø> (-1.84%) ⬇️
ur20-latest 76.57% <ø> (-0.02%) ⬇️
ur5-3.14.3 76.45% <ø> (-0.08%) ⬇️
ur5e-10.11.0 70.75% <ø> (-0.26%) ⬇️
ur5e-10.12.0 71.98% <ø> (-0.05%) ⬇️
ur5e-10.7.0 70.71% <ø> (+0.01%) ⬆️
ur5e-5.9.4 76.89% <ø> (-0.06%) ⬇️
ur7e-10.13.0 72.60% <ø> (+0.08%) ⬆️
ur7e-10.14.0 73.07% <ø> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@urfeex urfeex changed the title Add a workflow that checks the PR title Add a wokflow that checks the PR title Sep 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread .github/check_pr_title.sh
Comment on lines +71 to +74
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
Comment thread .github/check_pr_title.sh
# --- 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
@urfeex urfeex changed the title Add a wokflow that checks the PR title Add workflow checks the PR title Sep 10, 2026
@urfeex urfeex changed the title Add workflow checks the PR title Add workflow Sep 10, 2026
@urfeex urfeex changed the title Add workflow Add a workflow that checks the PR title Sep 10, 2026
@mergify

mergify Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@urfeex
urfeex merged commit 3bbe00b into UniversalRobots:master Sep 14, 2026
101 of 108 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants