CN-WenYu/dsh-git-conventions ↗★ 1
dsh-git-conventions
Enforce configurable git commit / push / PR conventions for DeepSeek Harness agents
AI 分析
核心用途是强制规范 DSH 智能体生成的 Git 提交信息和 PR 格式,防止乱写 Commit。适合对代码库提交规范有严格要求的团队项目。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:CN-WenYu/dsh-git-conventionsドキュメント
README 全文を読む ↗配置项
命名空间 git-conventions:
| 字段 | 类型 | 默认 | 含义 |
|---|---|---|---|
commitInstructions | string | Conventional Commits(zh/en 随语言) | 提交说明规则;违规时作为重写提示回显 |
prInstructions | string | PR 模板(zh/en 随语言) | 拉取请求标题 / 描述规则 |
enforce | boolean | true | 是否强制拦截;关闭后全部放行 |
useForceWithLease | boolean | true | git push 出现裸 --force 时提醒改用 --force-with-lease |
任何修改即时生效,无需重启。
使用示例
合规:正常放行
git commit -m "feat(agent): 新增 git 提交规范拦截"
git commit -m "fix(commit): 修正 subject 校验的空消息边界"
git push --force-with-lease
gh pr create --title "feat: 支持 scope 校验" \
--body "动机与背景 / 主要改动 / 测试与验证 / 影响范围"
违规:被拦截