Skip to content

Conversation

@shenxianpeng
Copy link
Contributor

@shenxianpeng shenxianpeng commented Oct 3, 2025

Summary by CodeRabbit

  • Documentation

    • README and docs updated to reference TOML configs (cchk.toml / commit-check.toml), simplify pre-commit hook examples, remove deprecated CLI flags, standardize commit-rejection messaging and guidance links, and add a note pointing to more available checks.
  • Chores

    • Default commit subject max length increased from 50 to 80 characters.

@shenxianpeng shenxianpeng requested a review from a team as a code owner October 3, 2025 18:05
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 3, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Update README to reference TOML-based configuration (cchk.toml / commit-check.toml), remove certain CLI flags and pre-commit hook IDs, revise error/message examples and links, and increase subject_max_length in cchk.toml from 50 to 80 (and require Signed-off-by).

Changes

Cohort / File(s) Summary
Documentation
README.rst
Replace .commit-check.yml references with cchk.toml / commit-check.toml; update default-config link; remove --commit-signoff, --merge-base, --imperative flags and related hook IDs; simplify pre-commit example; consolidate and standardize error messages and guidance (Conventional Commits/Branch); add “see commit-check.toml” note.
Config defaults
cchk.toml
In [commit], change subject_max_length from 5080 and enable require_signed_off_by (true).
Docs site
docs/configuration.rst
Document TOML config semantics: treat many options as optional (no-limit defaults for subject lengths), add allow_authors/ignore_authors/require_signed_off_by docs, clarify require_rebase_target is optional/None by default, and show commented example options.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Git as Git
  participant Hook as pre-commit hook
  participant CC as commit-check
  participant Cfg as cchk.toml

  Dev->>Git: git commit
  Git->>Hook: Run configured hook
  Hook->>CC: Invoke commit-check (uses TOML config)
  CC->>Cfg: Load `cchk.toml` / `commit-check.toml`
  Cfg-->>CC: subject_max_length=80, require_signed_off_by=true

  CC->>CC: Validate commit (subject length, Signed-off-by, other checks)
  alt Validation fails
    CC-->>Hook: Reject (Commit rejected.)
  else Validation passes
    CC-->>Hook: Accept
  end
  Hook-->>Git: Result
  Git-->>Dev: Commit accepted/rejected
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I nibble notes with whiskered grace,
TOML paths now mark the place.
Eighty chars let subjects roam,
Signed-off stamps bring them home.
Hop and commit — tidy trace! 🐇✍️

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly indicates that this pull request updates the README file for version 2 documentation, which aligns with the most prominent changes to README.rst. Although the changes extend to configuration examples and the configuration reference docs, the core update to README.rst is accurately captured. The prefix "docs:" adheres to conventional commit style and indicates documentation changes. Therefore, the title is relevant and sufficiently clear.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/update-docs

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.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 3, 2025

Copy link
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a4e086d and dcf8ffb.

📒 Files selected for processing (1)
  • docs/configuration.rst (5 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Maintain Sphinx documentation under docs/ to build HTML docs with sphinx-build

Files:

  • docs/configuration.rst
🧠 Learnings (1)
📚 Learning: 2025-10-03T10:28:06.753Z
Learnt from: CR
PR: commit-check/commit-check#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-03T10:28:06.753Z
Learning: Applies to pyproject.toml : Declare package metadata, dependencies, and console entry points for commit-check and cchk

Applied to files:

  • docs/configuration.rst

Comment on lines +120 to +128
- allow_authors
- list[str]
- [] (all allowed)
- List of allowed authors. If empty, all authors are allowed except those in ignore_authors.
* - commit
- ignore_authors
- list[str]
- [] (none ignored)
- List of authors to ignore (i.e., always allow).
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Clarify the allow_authors / ignore_authors defaults

The new description is self‑contradictory: it says that an empty allow_authors means “all authors are allowed except those in ignore_authors,” while the very next row explains that ignore_authors members are “always allow[ed].” Please reconcile these statements so readers know whether authors listed in ignore_authors are permitted or blocked when allow_authors is empty. A consistent explanation (and matching example comment above) is needed to avoid misconfiguration.

🤖 Prompt for AI Agents
In docs/configuration.rst around lines 120 to 128, the two rows for
allow_authors and ignore_authors are self-contradictory; decide and document a
single consistent behavior and update both rows and the example
accordingly—specifically, make ignore_authors explicitly "List of authors to
always allow (exempt from allow_authors restrictions)" and change the
allow_authors row to "[] (all allowed) — If empty, all authors are allowed;
authors listed in ignore_authors are still permitted." Ensure the example
comment above matches this wording.

@shenxianpeng shenxianpeng merged commit 565af1a into main Oct 3, 2025
8 checks passed
@shenxianpeng shenxianpeng deleted the feature/update-docs branch October 3, 2025 18:56
@shenxianpeng shenxianpeng removed the enhancement New feature or request label Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants