这个特定的钩子在 Black 存储库中的.pre-commit-hooks.yaml下定义,其他自定义钩子也在其各自的包存储库下。 当地的 也可以创建自己的本地钩子,而无需配置单独的 .pre-commit-hooks.yaml。这里定义了两个 pre-commit 钩子,test-non-training并且clean,来运行在 Makefile 中定义
cz check range sometimes failed in GitLab CI #593 Open Lee-W changed the base branch from master to v4 August 22, 2024 02:33 dependabot bot and others added 3 commits August 23, 2024 10:18 build(deps-dev): bump ruff from 0.6.1 to 0.6.2 … 9f085a1 fix(pre-commit-hooks)...
cd <git-repo> pre-commit install # 卸载 pre-commit uninstall 按照操作将会在项目的.git/hooks下生成一个pre-commit文件(覆盖原pre-commit文件),该hook会根据项目根目录下的.pre-commit-config.yaml 执行任务。如果vim .git/hooks/pre-commit可以看到代码的实现,基本逻辑是利用pre-commit文件去拓展更多的pre-co...
这个特定的钩子在 Black 存储库中的.pre-commit-hooks.yaml下定义,其他自定义钩子也在其各自的包存储库下。 当地的 也可以创建自己的本地钩子,而无需配置单独的 .pre-commit-hooks.yaml。这里定义了两个 pre-commit 钩子,test-non-training并且clean,来运行在 Makefile 中定义的一些命令。同样,可以运行任何带有...
hooks: - id: yamllint name: Check YAML syntax with yamllint args: [--strict, '.'] always_run: true pass_filenames: false - repo: https://github.com/warpnet/salt-lint rev: v0.8.0 rev: v0.9.2 hooks: - id: salt-lint name: Check Salt files using salt-lint files: ^.*\.(sls...
repos:-repo:https://github.com/pre-commit/pre-commit-hooksrev:v2.3.0hooks:-id:check-yaml-id:end-of-file-fixer-id:trailing-whitespace-repo:https://github.com/psf/blackrev:22.10.0hooks:-id:black 3. Install the git hook scripts
#!/bin/sh if [ -f .git/hooks/pre-commit ]; then source .git/hooks/pre-commit fi if [ -f .git/hooks/pre-push ]; then source .git/hooks/pre-push fi 确保上述脚本在 Git 的预提交和预推送钩子前运行,并调用配置好的 pre-commit 命令。 配合GitHub Actions 或 GitLab CI 进行持续集成 在...
git-commit-hooks 是内置的预提交钩子,用于自动化 Git 流程中的某些任务。例如,使用 commit-msg 钩子可以在提交信息中执行检查,确保它满足某些规则。 hooks: - id: git-commit-hooks name: Git Commit Hooks entry: my_commit_hook.py pre-commit 自定义脚本 pre-commit 允许你编写自定义脚本来实现更复杂的预...
- repo: https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile.git rev: 1.1.0 hooks: - id: prepare-commit-message name: Prepare commit message automatically description: Automatically prepare the commit message for manual edition stages: - prepare-commit-msg entry: ./.hooks/pre...
- repo: meta hooks: - id: check-hooks-apply - id: check-useless-excludes # Repository: pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 ... ... Please register or sign in to comment ...