🐛 修复贡献者过滤自定义bot名称
Ubuntu System Information / show-system-info (push) Successful in 38s Details

This commit is contained in:
csh 2025-12-09 17:51:48 +08:00
parent 44e92ab89a
commit 1b5611cf3e
1 changed files with 3 additions and 0 deletions

View File

@ -621,17 +621,20 @@ jobs:
echo "👥 收集贡献者..." echo "👥 收集贡献者..."
# 收集贡献者 (去除 bot) # 收集贡献者 (去除 bot)
# 动态过滤配置的 bot 用户名
if [ "$COMMIT_RANGE" = "HEAD" ]; then if [ "$COMMIT_RANGE" = "HEAD" ]; then
CONTRIBUTORS=$(git log --pretty=format:"%an" --no-merges | \ CONTRIBUTORS=$(git log --pretty=format:"%an" --no-merges | \
grep -v "github-actions\[bot\]" | \ grep -v "github-actions\[bot\]" | \
grep -v "dependabot\[bot\]" | \ grep -v "dependabot\[bot\]" | \
grep -v "renovate\[bot\]" | \ grep -v "renovate\[bot\]" | \
grep -v "^${{ env.GIT_USER_NAME }}$" | \
sort -u) sort -u)
else else
CONTRIBUTORS=$(git log $COMMIT_RANGE --pretty=format:"%an" --no-merges | \ CONTRIBUTORS=$(git log $COMMIT_RANGE --pretty=format:"%an" --no-merges | \
grep -v "github-actions\[bot\]" | \ grep -v "github-actions\[bot\]" | \
grep -v "dependabot\[bot\]" | \ grep -v "dependabot\[bot\]" | \
grep -v "renovate\[bot\]" | \ grep -v "renovate\[bot\]" | \
grep -v "^${{ env.GIT_USER_NAME }}$" | \
sort -u) sort -u)
fi fi