Skip to content

Comments

chore(pre-commit): add default install config for pre-commit#862

Merged
yangxk1 merged 2 commits intoapache:mainfrom
SYaoJun:214_conventional
Feb 25, 2026
Merged

chore(pre-commit): add default install config for pre-commit#862
yangxk1 merged 2 commits intoapache:mainfrom
SYaoJun:214_conventional

Conversation

@SYaoJun
Copy link
Contributor

@SYaoJun SYaoJun commented Feb 14, 2026

Reason for this PR

  1. simplify commit-msg install script

The conventional-pre-commit could be installed by the following script:

pre-commit install --hook-type commit-msg

A better way is to set a default configuration in .pre-commit-config.yaml and installed by pre-commit install

  1. bump conventional-pre-commit to latest version

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

…te conventional-pre-commit to latest version
@SYaoJun
Copy link
Contributor Author

SYaoJun commented Feb 20, 2026

@Sober7135 When you have time, could you please help review this PR? Thank you.

@Sober7135
Copy link
Contributor

Sorry, I’m not very familiar with pre-commit, so could you please ask xiaokang to review this? :D

@SYaoJun
Copy link
Contributor Author

SYaoJun commented Feb 22, 2026

Sorry, I’m not very familiar with pre-commit, so could you please ask xiaokang to review this? :D

Ok, thank you.

Copy link
Contributor

@yangxk1 yangxk1 left a comment

Choose a reason for hiding this comment

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

LGTM

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 simplifies the pre-commit installation process by adding a default_install_hook_types configuration to .pre-commit-config.yaml, eliminating the need to run separate pre-commit install --hook-type commit-msg commands. The PR also upgrades the conventional-pre-commit tool from v3.0.0 to v4.3.0 and modifies its configuration arguments.

Changes:

  • Added default_install_hook_types to automatically install both pre-commit and commit-msg hooks with a single pre-commit install command
  • Upgraded conventional-pre-commit from v3.0.0 to v4.3.0
  • Simplified conventional-pre-commit configuration by removing explicit type definitions and replacing with --verbose flag
Comments suppressed due to low confidence (1)

.pre-commit-config.yaml:66

  • There appears to be trailing whitespace on line 66 (after the closing bracket). This should be removed for consistency with the rest of the file.
        args: [--verbose]
        

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

keep the explicit types configuration

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jason <libevent@yeah.net>
@SYaoJun SYaoJun requested a review from yangxk1 February 24, 2026 04:27
@yangxk1 yangxk1 merged commit 06c5e79 into apache:main Feb 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants