liurenchaxin/agents/pre-commit-hook

12 lines
258 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Agent提交前的钩子
echo "🔍 检查agent身份..."
AGENT_NAME=$(git config user.name)
if [[ -z "$AGENT_NAME" ]]; then
echo "❌ 未设置agent身份请先使用agent协作系统"
exit 1
fi
echo "✅ 当前agent: $AGENT_NAME"