ci: enforce Conventional Commits on PR title instead of commits - #20
Conversation
Since the repo squash-merges every PR, the PR title becomes the squash commit message and the changelog source — so that is what must follow Conventional Commits, not the individual branch commits that get discarded on squash. - Add a check-pr-title job that validates the PR title and reports into the existing compliance comment - Remove the now-redundant per-commit check-conventional-commits job - Drop the local husky commit-msg/commitlint setup (hook, config, and the @commitlint/* devDeps) that enforced the same discarded-commit rule - Document the squash/PR-title workflow and protected main in CONTRIBUTING.md, and correct the pnpm version prerequisite Signed-off-by: Robbin "Roboroads" Schepers <robbin@deschepers.nl>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughMigrates from local commit-message validation to a GitHub Actions ChangesPR Title Validation Workflow
🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/pr-compliance.yml (1)
30-38:⚠️ Potential issue | 🟠 Major | ⚡ Quick winPin
actions/github-scriptto a full commit SHA (not@v7).
.github/workflows/pr-compliance.ymlreferencesuses: actions/github-script@v7at lines 17, 37, 71, and 117; replace@v7with the exact 40-character commit SHA to reduce supply-chain risk inpull_request_target.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/pr-compliance.yml around lines 30 - 38, Replace the floating tag for the GitHub Action with a pinned commit SHA: locate the workflow job "check-pr-title" (and other jobs/steps using actions/github-script, e.g., the step with id "check") and change every uses: actions/github-script@v7 to uses: actions/github-script@<40-char-commit-sha> (the exact full commit SHA from the actions/github-script repository) so the workflow references a specific immutable commit instead of the v7 tag.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CONTRIBUTING.md`:
- Around line 66-70: The fenced code block containing the commit examples is
missing a language identifier which triggers MD040; update the triple-backtick
fence that wraps the three lines ("feat: add crossfade support", "fix(ipc):
handle null device on reconnect", "chore!: drop support for Node 22") to include
a language tag (e.g., change ``` to ```text) so the block becomes ```text ...
``` for proper markdownlint compliance.
---
Outside diff comments:
In @.github/workflows/pr-compliance.yml:
- Around line 30-38: Replace the floating tag for the GitHub Action with a
pinned commit SHA: locate the workflow job "check-pr-title" (and other
jobs/steps using actions/github-script, e.g., the step with id "check") and
change every uses: actions/github-script@v7 to uses:
actions/github-script@<40-char-commit-sha> (the exact full commit SHA from the
actions/github-script repository) so the workflow references a specific
immutable commit instead of the v7 tag.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c3c46a16-874e-4ad1-9193-806c29634568
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
.github/workflows/pr-compliance.yml.husky/commit-msgCONTRIBUTING.mdcommitlint.config.cjspackage.json
💤 Files with no reviewable changes (3)
- .husky/commit-msg
- commitlint.config.cjs
- package.json
|
✅ All compliance checks are now passing — thanks for updating your PR! |
Signed-off-by: Robbin "Roboroads" Schepers <robbin@deschepers.nl>
8b7f293 to
eb6261d
Compare
Signed-off-by: Robbin Roboroads Schepers <robbin@deschepers.nl>
What
Switches PR compliance from checking individual commit messages to checking the PR title, and removes the now-redundant local commitlint setup.
check-pr-titlejob that validates the PR title against Conventional Commits and reports into the existing auto-updating compliance commentcheck-conventional-commitsjobcommit-msghook,commitlint.config.cjs, and the@commitlint/*devDeps (purged from the lockfile too)CONTRIBUTING.mdand correct the pnpm version prerequisiteWhy
Every PR is squash-merged, so the PR title becomes the squash commit message and the changelog source — that's what must follow Conventional Commits. The individual branch commits are discarded on squash, so enforcing the format on them (both in CI and via the local husky hook) was redundant friction with no effect on what lands on
main.AI disclosure
Authored with assistance from Claude Code; everything is human-reviewed by me, and the type-check (
pnpm check) passed locally.Summary by CodeRabbit
Chores
Documentation