Auto-sync: update nexus workspace
This commit is contained in:
34
wiki/concepts/Pre-commit-Hooks.md
Normal file
34
wiki/concepts/Pre-commit-Hooks.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "Pre-commit Hooks"
|
||||
type: concept
|
||||
tags:
|
||||
- GitOps
|
||||
- DevOps
|
||||
- CI/CD
|
||||
- Automation
|
||||
last_updated: 2026-05-11
|
||||
---
|
||||
|
||||
# Pre-commit Hooks
|
||||
|
||||
## Definition
|
||||
在提交代码前运行的脚本工具,通常用于代码格式化、linting、安全扫描等。Renovate Bot 可以自动检测并更新这些钩子插件的版本号。
|
||||
|
||||
## Core Functions
|
||||
- 在 `git commit` 前自动执行检查脚本
|
||||
- 常用场景:代码格式化(Prettier)、linting(ESLint)、安全扫描(Trivy)、Secrets 检测
|
||||
- 版本管理:保持钩子插件版本与最新安全修复同步
|
||||
- Renovate 集成:自动为 pre-commit 配置文件(如 `.pre-commit-config.yaml`)中的版本标签创建更新 PR
|
||||
|
||||
## Related Concepts
|
||||
- [[Renovate-Bot]] — Renovate Bot 可自动更新 pre-commit 钩子插件版本
|
||||
- [[Dependency-Management]] — pre-commit 钩子是项目依赖的一部分
|
||||
- [[GitOps]] — pre-commit 是 GitOps 工作流中的质量门禁
|
||||
|
||||
## Related Sources
|
||||
- [[ctp-topic-15-working-with-renovatebot]]
|
||||
|
||||
## Aliases
|
||||
- Git Hooks
|
||||
- Pre-commit Framework
|
||||
- pre-commit-config.yaml
|
||||
Reference in New Issue
Block a user