Skip to content

chore!: Add json-schema for configuration#7

Merged
thumbrise merged 1 commit into
mainfrom
jsonschema
May 28, 2026
Merged

chore!: Add json-schema for configuration#7
thumbrise merged 1 commit into
mainfrom
jsonschema

Conversation

@thumbrise
Copy link
Copy Markdown
Owner

@thumbrise thumbrise commented May 28, 2026

Summary by CodeRabbit

  • Documentation
    • Added configuration schema documentation for commitlint-scope, defining the expected structure of configuration objects with support for scope regex patterns and flexible pattern matching.

Review Change Stack

@thumbrise thumbrise self-assigned this May 28, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@thumbrise, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 55 minutes and 54 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fa270217-7984-4972-9e4c-8109017cd44c

📥 Commits

Reviewing files that changed from the base of the PR and between 93ffe22 and 0c91789.

📒 Files selected for processing (1)
  • docs/schema/config.json
📝 Walkthrough

Walkthrough

This PR adds a JSON Schema document (docs/schema/config.json) that formally defines the structure and validation constraints for commitlint-scope configuration objects. The schema specifies scopeRegex and patterns fields with type and format constraints, marks required properties, and prevents additional undefined properties.

Changes

Configuration Schema Definition

Layer / File(s) Summary
Configuration schema definition
docs/schema/config.json
JSON Schema (draft 2020-12) that defines the commitlint-scope config structure, including scopeRegex string field with regex format, patterns object with glob pattern array values, and explicit additionalProperties: false constraint.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A schema hops into view, so clean and so bright,
JSON structure defined with all rules just right,
No extra properties allowed to take flight,
Config constraints documented—a documentation delight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a JSON Schema file for configuration. It is clear, specific, and directly reflects the changeset content.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jsonschema

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@docs/schema/config.json`:
- Around line 8-11: The regex property that currently has "type":"string" and
"format":"regex" (the entry whose description requires a named group 'scope')
must include a JSON Schema "pattern" to enforce presence of a named capture for
"scope"; update that property to add a "pattern" that matches either of the
common named-group syntaxes (e.g. (?P<scope>...) or (?<scope>...)) so schema
validation fails early if the provided regex lacks a 'scope' named group.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 45bdfbbd-daef-4f37-bd41-f072a480f936

📥 Commits

Reviewing files that changed from the base of the PR and between c58ab20 and 93ffe22.

📒 Files selected for processing (1)
  • docs/schema/config.json

Comment thread docs/schema/config.json
@thumbrise thumbrise merged commit 1714416 into main May 28, 2026
4 checks passed
@thumbrise thumbrise deleted the jsonschema branch May 28, 2026 07:21
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

1 participant