ci: Add commit-lint enforcement for PR titles - #315
Merged
Conversation
Ports c2pa-rs's pr_title.yml/.commitlintrc.yml, but disallows scope entirely (as github.com/adobe/xmp-toolkit-rs does) since c2patool is a single crate and a scope would never disambiguate anything. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #315 +/- ##
=======================================
Coverage 72.16% 72.16%
=======================================
Files 4 4
Lines 1060 1060
=======================================
Hits 765 765
Misses 295 295 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
.commitlintrc.ymland.github/workflows/pr_title.yml, ported from c2pa-rs's commit-lint setup.scopeis disallowed entirely (optional: false,options: []), following adobe/xmp-toolkit-rs's no-scope pattern — c2patool is a single crate, so a scope would never disambiguate anything the way it does in c2pa-rs's multi-crate monorepo.typelist matches c2pa-rs's (feat,fix,chore,docs,build,ci,perf,refactor,revert,style,test,update), since this repo's actual commit history (inherited from the c2pa-rs monorepo split) already uses most of these.docs/release-process.mdwith a "Commit lint used for PR title enforcement" section (mirroring c2pa-rs's, minus scope), replacing the stale note that flagged this as not-yet-ported follow-up work.CONTRIBUTING.md's "Pull request titles" section, which was still copied from c2pa-rs and described scope as optional-but-preferred — now points at this repo's own.commitlintrc.ymland states scope is disallowed.Test plan
commitlint-rslocally and validated.commitlintrc.ymlagainst sample titles: a valid no-scope title passes; a scoped title, a lowercase description, an unknown type, and a trailing period each correctly fail.chore: release/update: bump/update: updateexception patterns match the title shapes release-plz and Dependabot actually produce.actionlintagainst the new workflow (only a pre-existing-style shellcheck info note, matching whatci.ymlalready has).🤖 Generated with Claude Code