Skip to content

chore: recognize additional common imperative verbs - #496

Merged
shenxianpeng merged 1 commit into
commit-check:mainfrom
lntutor:fix/493-imperative-verbs
Jul 31, 2026
Merged

chore: recognize additional common imperative verbs#496
shenxianpeng merged 1 commit into
commit-check:mainfrom
lntutor:fix/493-imperative-verbs

Conversation

@lntutor

@lntutor lntutor commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add backport, comment, polyfill, revamp, and vendor to the imperative allow-list
  • add coverage for all requested examples, including the already-supported embed verb

Validation

  • direct SubjectImperativeValidator assertions for all six subjects
  • git diff --check

The pytest command could not run because pytest is unavailable in the local Python environment.

Fixes #493

Summary by CodeRabbit

  • New Features

    • Expanded commit subject validation to recognize five additional imperative verbs: backport, comment, polyfill, revamp, and vendor.
  • Tests

    • Added coverage for common imperative commit subject formats to improve validation reliability.

@lntutor
lntutor requested a review from a team as a code owner July 31, 2026 16:56
@lntutor
lntutor requested review from shenxianpeng and removed request for a team July 31, 2026 16:56
@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit f96494e
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/6a6cd3c74029c70008f63f3e
😎 Deploy Preview https://deploy-preview-496--commit-check.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added bug Something isn't working tests Add test related changes labels Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The imperative verb allow-list adds backport, comment, polyfill, revamp, and vendor. A parametrized test validates six common imperative commit subjects.

Changes

Imperative validation

Layer / File(s) Summary
Extend imperative allow-list and validate subjects
commit_check/imperatives.py, tests/engine_test.py
The IMPERATIVES set adds five verbs. A parametrized SubjectImperativeValidator test covers six imperative subject forms.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: shenxianpeng

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes add all requested verbs and tests covering the new verbs plus embed, matching issue #493.
Out of Scope Changes check ✅ Passed The changes remain limited to the imperative allow-list and related tests, as required by issue #493.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the addition of common imperative verbs to validation.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@sonarqubecloud

Copy link
Copy Markdown

@shenxianpeng shenxianpeng added chore and removed bug Something isn't working tests Add test related changes labels Jul 31, 2026
@shenxianpeng shenxianpeng changed the title Recognize additional common imperative verbs chore: recognize additional common imperative verbs Jul 31, 2026
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.36%. Comparing base (3095509) to head (f96494e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #496   +/-   ##
=======================================
  Coverage   97.36%   97.36%           
=======================================
  Files          12       12           
  Lines        1175     1175           
=======================================
  Hits         1144     1144           
  Misses         31       31           

☔ View full report in Codecov by Harness.
📢 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.

@shenxianpeng
shenxianpeng merged commit 91c4a9f into commit-check:main Jul 31, 2026
29 checks passed
@codspeed-hq

codspeed-hq Bot commented Jul 31, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 384 untouched benchmarks
🆕 6 new benchmarks
⏩ 115 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 test_validate_with_common_imperative_subjects[build: polyfill the API] N/A 149.3 µs N/A
🆕 test_validate_with_common_imperative_subjects[chore: comment out the entry] N/A 149.3 µs N/A
🆕 test_validate_with_common_imperative_subjects[chore: vendor the dependency] N/A 150.4 µs N/A
🆕 test_validate_with_common_imperative_subjects[docs: embed the example] N/A 150.1 µs N/A
🆕 test_validate_with_common_imperative_subjects[docs: revamp the profile] N/A 149.1 µs N/A
🆕 test_validate_with_common_imperative_subjects[fix: backport the patch] N/A 156.1 µs N/A

Comparing lntutor:fix/493-imperative-verbs (f96494e) with main (3095509)

Open in CodSpeed

Footnotes

  1. 115 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.

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.

Add commonly-used imperative verbs missing from the imperative list

2 participants