fix(ci): 修复auto-merge checkout缓存损坏 + 清理老合并脚本 #484
Reference in New Issue
Block a user
Delete Branch "fix/auto-merge-checkout-and-legacy-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
背景
PR #482 暴露了 auto-merge 相关的两个问题:
auto-merge.yml和auto-approve.yml仍使用actions/checkout@v3,runner 本地缓存损坏会导致 job 直接挂掉auto-merge.yml+ 老脚本scripts/auto_merge_prs.sh(可能还在 crontab 跑)变更内容
1. 修复 checkout 缓存损坏问题
将
.gitea/workflows/auto-approve.yml和.gitea/workflows/auto-merge.yml中的actions/checkout@v3替换为与ci-cd.yml一致的 tar.gz 下载方式(python3 + urllib + tarfile):2. 清理老合并脚本
删除
scripts/auto_merge_prs.sh,该脚本已由.gitea/workflows/auto-merge.yml完全替代。调查结论(基于 Gitea API 审计):
auto-approve-bot用户创建之前,所有自动合并 PR 的merged_by均为xiaoxia(老脚本使用管理员 token)merged_by均为auto-approve-bot(CI workflow 使用的 bot token)CI 内置版相对老脚本的优势:
影响范围
CI全绿,自动审批通过。
CI全绿,自动审批通过。
Auto merge failed: PR may have conflicts or unresolved checks. Please review manually.