(1)安装 pre-commit:pip3 install pre-commit (2)在项目根目录添加.pre-commit-config.yaml,内容如下: repos:# 一些现成的 hooks,还有更多hooks详见下方的 repo 链接-repo:https://github.com/pre-commit/pre-commit-hooksrev:v4.4.0hooks:-id:check-added-large-files-id:check-case-conflict-id:check-me...
-repo:https://github.com/pre-commit/pre-commit-hooks rev:v4.4.0#Usetherefyouwanttopointat hooks: -id:trailing-whitespace #-id:... ``` Hooks available check-added-large-files Prevent giant files from being committed. Specify what is "too large" withargs: ['--maxkb=123'](default=500...
pre_commit_hooks Fix grammar of check-shebang-scripts error Dec 19, 2024 testing drop python3.6 support Jan 16, 2022 tests Disallow --unique alongside --ignore-cases in file-contents-sorter Oct 27, 2024 .gitignore remove unneeded gitignore lines ...
pre-commit-hooksPublic Some out-of-the-box hooks for pre-commit Python5,509MIT71673UpdatedJan 20, 2025 pre-commit.comPublic Python1963083(1 issue needs help)1UpdatedJan 21, 2025 pre-commit-mirror-makerPublic Scripts for creating mirror repositories that do not have .pre-commit-hooks.yaml ...
# YAML文件repos:-repo:https://github.com/psf/blackrev:stablehooks:-id:black-repo:https://github.com/pre-commit/pre-commit-hooksrev:v4.1.0hooks:-id:trailing-whitespace-id:end-of-file-fixer-id:check-yaml# 在这个示例中,我们使用了两个pre-commit钩子,# 一个是flake8用于代码风格检查,另一个是...
在新初始化的git项目内,可以在.git/hooks文件夹中找到官方提供的样例: ls-l.git/hooks total120 -rwxr-xr-x1tomo staff 478B Nov1120:44 applypatch-msg.sample -rwxr-xr-x1tomo staff 896B Nov1120:44 commit-msg.sample -rwxr-xr-x1tomo staff4.5K Nov1120:44 fsmonitor-watchman.sample...
Pre-receive hooks run tests on code pushed to a repository to ensure contributions meet repository or organization policy. If the commit contents pass the tests, the push will be accepted into the repository. If the commit contents do not pass the tests, the push will not be accepted. ...
post/admin/pre-receive-hooks cURLJavaScript curl \ -X POST \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/admin/pre-receive-hooks \ -d '{"name":"Check Commits","script":"scripts/commit_check.sh","enforcement":"disa...
.pre-commit-hooks 2022 year for default copyright 3年前 audio [audio] fix load paddleaudio fail (#2815) 2年前 dataset [ASR] add code-switch asr tal_cs recipe (#2796) 2年前 demos [ASR] add asr code-switch cli and demo, test='asr' (#2816) 2年前 docker Fix ...
Commit and push to your designated pre-receive hooks repository on the GitHub Enterprise Server instance. $ git commit -m "YOUR COMMIT MESSAGE" $ git push Create the pre-receive hookon the GitHub Enterprise Server instance. Testing pre-receive scripts locally ...