Skip to content

Conversation

@shenxianpeng
Copy link
Contributor

@shenxianpeng shenxianpeng commented Oct 12, 2025

closes #240

Summary by CodeRabbit

  • New Features

    • Commit message checks now accept "redesign" as a valid imperative verb.
  • Documentation

    • README streamlined to focus on pip/GitHub installation and links to external usage docs.
    • New comprehensive examples page covering CLI, pre-commit, and CI usage with sample valid/invalid messages and configuration guidance.
    • Docs navigation updated to include the examples page and changelog header simplified.

@shenxianpeng shenxianpeng requested a review from a team as a code owner October 12, 2025 20:45
@shenxianpeng shenxianpeng added the documentation Improvements or additions to documentation label Oct 12, 2025
@github-actions github-actions bot added the enhancement New feature or request label Oct 12, 2025
@shenxianpeng shenxianpeng requested review from Copilot and removed request for a team October 12, 2025 20:45
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 12, 2025

Walkthrough

README was condensed to focus on installation and externalized usage/examples to docs/example.rst; docs/index.rst updated to include the new example page; docs/changelog.rst had its front-matter status line removed. Code change: added "redesign" to the IMPERATIVES set in commit_check/imperatives.py.

Changes

Cohort / File(s) Summary of changes
Docs restructuring
README.rst, docs/index.rst, docs/example.rst, docs/changelog.rst
README simplified to installation-focused content and links to external usage/examples; new docs/example.rst added and linked from docs/index.rst; removed :status: new front-matter from docs/changelog.rst.
Imperative verbs update
commit_check/imperatives.py
Added the imperative verb "redesign" to the IMPERATIVES set.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I hop through commits, tidy and keen,
Docs moved out where examples are seen,
Pip installs quick, the README is light,
"Redesign" hops in, ready to write.
Thump for clarity, carrots for delight. 🥕🐇

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 pull request title accurately reflects the primary change of introducing a detailed examples documentation page under docs, matching the addition of docs/example.rst and its inclusion in the index, and follows the conventional “docs:” prefix for documentation updates.
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/add-example-doc

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8cb0650 and 1cd8c3c.

📒 Files selected for processing (1)
  • docs/example.rst (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/example.rst
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: install (3.14, macos-latest)
  • GitHub Check: install (3.12, windows-latest)
  • GitHub Check: install (3.14, windows-latest)
  • GitHub Check: install (3.11, windows-latest)
  • GitHub Check: install (3.13, windows-latest)
  • GitHub Check: install (3.10, macos-latest)
  • GitHub Check: install (3.10, windows-latest)
  • GitHub Check: install (3.9, windows-latest)
  • GitHub Check: Run benchmarks

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
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive usage documentation to the commit-check project by creating a new example.rst file and reorganizing the README structure. The documentation focuses on providing practical examples for different usage scenarios.

Key changes include:

  • Creation of detailed usage examples documentation covering pre-commit hooks, CLI usage, and various validation scenarios
  • Addition of the new example.rst file to the documentation index
  • Streamlining of the README by moving detailed usage examples to the dedicated documentation file
  • Addition of "redesign" to the list of valid imperative verbs

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/index.rst Added reference to new example.rst in the documentation table of contents
docs/example.rst New comprehensive usage examples documentation with pre-commit, CLI, and validation scenarios
docs/changelog.rst Removed status metadata from changelog header
commit_check/imperatives.py Added "redesign" as a valid imperative verb
README.rst Streamlined by moving detailed usage examples to dedicated documentation and reorganizing sections

@shenxianpeng shenxianpeng changed the title docs: add new example.rst docs: add new examples documentation Oct 12, 2025
@codecov
Copy link

codecov bot commented Oct 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.98%. Comparing base (8e1e60e) to head (1cd8c3c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #303   +/-   ##
=======================================
  Coverage   86.98%   86.98%           
=======================================
  Files           8        8           
  Lines         684      684           
=======================================
  Hits          595      595           
  Misses         89       89           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 12, 2025

CodSpeed Performance Report

Merging #303 will not alter performance

Comparing feature/add-example-doc (1cd8c3c) with main (734686b)1

Summary

✅ 27 untouched
⏩ 85 skipped2

Footnotes

  1. No successful run was found on main (8e1e60e) during the generation of this report, so 734686b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 85 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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 8e1e60e and 4a2f597.

📒 Files selected for processing (5)
  • README.rst (2 hunks)
  • commit_check/imperatives.py (1 hunks)
  • docs/changelog.rst (0 hunks)
  • docs/example.rst (1 hunks)
  • docs/index.rst (1 hunks)
💤 Files with no reviewable changes (1)
  • docs/changelog.rst
🧰 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/index.rst
  • docs/example.rst
🧠 Learnings (3)
📚 Learning: 2025-10-03T10:28:06.793Z
Learnt from: CR
PR: commit-check/commit-check#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-03T10:28:06.793Z
Learning: Applies to .commit-check.yml : Maintain default validation rules for the tool in .commit-check.yml

Applied to files:

  • docs/example.rst
📚 Learning: 2025-10-03T10:28:06.793Z
Learnt from: CR
PR: commit-check/commit-check#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-03T10:28:06.793Z
Learning: Applies to commit_check/main.py : Expose CLI flags: --message, --branch, --help, --version, --config, --dry-run; support combining checks

Applied to files:

  • docs/example.rst
📚 Learning: 2025-10-03T10:28:06.793Z
Learnt from: CR
PR: commit-check/commit-check#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-03T10:28:06.793Z
Learning: Applies to commit_check/commit.py : Enforce Conventional Commits format: type(scope): description

Applied to files:

  • README.rst
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: install (3.13, macos-latest)
  • GitHub Check: install (3.10, windows-latest)
  • GitHub Check: install (3.13, windows-latest)
  • GitHub Check: install (3.14, macos-latest)
  • GitHub Check: install (3.12, windows-latest)
  • GitHub Check: install (3.14, windows-latest)
  • GitHub Check: install (3.9, windows-latest)
  • GitHub Check: install (3.10, macos-latest)
  • GitHub Check: install (3.9, macos-latest)
  • GitHub Check: install (3.11, windows-latest)
  • GitHub Check: Run benchmarks
🔇 Additional comments (11)
commit_check/imperatives.py (1)

167-167: LGTM! Addition aligns with documentation.

The imperative "redesign" is correctly added in alphabetical order and is referenced in the new documentation at line 200 of docs/example.rst.

docs/example.rst (5)

1-7: LGTM! Clear introduction.

The title and introductory text effectively set expectations for the document's scope.


8-50: LGTM! Well-structured setup instructions.

The GitHub Action and pre-commit hook sections provide clear, actionable steps with appropriate code blocks and tips.


52-224: LGTM! Comprehensive examples with clear organization.

The pre-commit validation, CLI examples, and message validation sections provide thorough coverage with both valid and invalid examples.


226-315: LGTM! Detailed error output examples.

The error output examples effectively demonstrate various failure scenarios with full ASCII art, helping users understand validation feedback.


317-354: LGTM! Practical integration guidance.

The CI/CD and scripting examples provide useful patterns for real-world usage.

docs/index.rst (1)

9-9: LGTM! Proper toctree integration.

The new "example" entry is correctly positioned in the documentation hierarchy between configuration and migration sections.

README.rst (4)

51-68: LGTM! Clear installation instructions.

The installation section provides straightforward pip-based installation options with appropriate follow-up guidance.


70-84: LGTM! Simplified configuration overview.

The configuration section effectively summarizes default and custom options while linking to detailed documentation.


85-88: LGTM! Appropriate delegation to detailed docs.

The usage section correctly directs users to the comprehensive example documentation.


138-138: LGTM! Consistent documentation linking.

The reference to example documentation maintains consistency with the new documentation structure.

@shenxianpeng shenxianpeng removed the enhancement New feature or request label Oct 12, 2025
@github-actions github-actions bot added the enhancement New feature or request label Oct 12, 2025
@shenxianpeng shenxianpeng changed the title docs: add new examples documentation docs: add comprehensive examples page Oct 12, 2025
@shenxianpeng shenxianpeng force-pushed the feature/add-example-doc branch from 8cb0650 to 1cd8c3c Compare October 12, 2025 20:57
@sonarqubecloud
Copy link

@shenxianpeng shenxianpeng removed the enhancement New feature or request label Oct 12, 2025
@shenxianpeng shenxianpeng merged commit 5dd8c73 into main Oct 12, 2025
32 checks passed
@shenxianpeng shenxianpeng deleted the feature/add-example-doc branch October 12, 2025 21:01
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.

Create comprehensive examples page for v2

2 participants