feat(enrichment): add conventional-commit subject linter analyzer#3346
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 04:32:53 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3346 +/- ##
=======================================
Coverage 93.88% 93.88%
=======================================
Files 280 280
Lines 30552 30552
Branches 11130 11130
=======================================
Hits 28684 28684
Misses 1211 1211
Partials 657 657
🚀 New features to boost your workflow:
|
Closes #2021
What
A new github-light REES analyzer,
commitLint, that lints a PR's commit subjects against the Conventional Commits spec and flags each non-conforming subject — a wrong/absent type, a missingtype:structure, an over-long subject, or an empty subject. A house-rule the gate cares about, surfaced early to the reviewer.Detection
commit.messageonly) through the shared bounded-fetch layer, followingcommit-hygiene.ts/commit-signature.tsexactly. Each subject is linted independently — no cross-commit or cross-line state, and the subject strings arrive from the API already clean (no diff/comment/string parsing).lintSubjectreason precedence:empty(blank subject) →too-long(> 72 chars) →missing-colon(nottype(scope)?!?: summary) →bad-type(type not in the Conventional-Commits/commitlint preset set: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert). A parenthesized scope and the!breaking-change marker are both optional per the spec.maxFindings: 25).Registration
Registered as a
github-lightdescriptor (categoryquality, requires["github-token"]) with an inlinerender(), following thecommitHygienedescriptor shape. All wiring updated:types.ts(CommitLintFinding+commitLint?key),render.ts,analyzer-registry.test.ts, rootsrc/review/enrichment-analyzer-names.ts(canonicalREES_ANALYZER_NAMES), roottest/unit/enrichment-wire.test.ts, and the generatedanalyzer-metadata.json/rees-analyzers.ts/.env.examplevianode scripts/generate-analyzer-metadata.mjs.Tests
review-enrichment/test/commit-lint.test.ts(8 tests) covers: a conforming subject (with/without scope and breaking marker) passing, each non-conforming reason, the empty/too-long precedence,analyzeCommitSubjectsreporting only non-conforming subjects with a short sha + truncated subject, subject-line-only linting (body ignored), the maxFindings cap + no-sha skip, the end-to-end fetch path, and the fail-safe paths (no token, bad slug, fetch error). Analyzer metadata is regenerated and committed.