From 1239315f97f3d778319bb3e4cb512542659d134c Mon Sep 17 00:00:00 2001 From: Beast Date: Sat, 20 Jun 2026 22:39:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20daily=5Fdigest=20=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20push=20=E5=89=8D=20git=20pull=20--rebase?= =?UTF-8?q?=EF=BC=8C=E9=98=B2=E6=AD=A2=E5=88=86=E6=94=AF=E5=88=86=E6=AD=A7?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=8E=A8=E9=80=81=E9=9D=99=E9=BB=98=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/run_daily_digest.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/run_daily_digest.sh b/scripts/run_daily_digest.sh index cddb0e4..2022e1f 100755 --- a/scripts/run_daily_digest.sh +++ b/scripts/run_daily_digest.sh @@ -17,11 +17,14 @@ python3 analyzers/daily_digest.py >> "$LOG_FILE" 2>&1 # Git push to Gitea cd "$PROJECT_DIR" +# 先拉取远程,避免分支分歧 +git pull --rebase origin main >> "$LOG_FILE" 2>&1 || true + # Check if there are changes if [[ -n $(git status --porcelain ai-insights/) ]]; then git add ai-insights/ git commit -m "daily digest $(date '+%Y-%m-%d')" - git push origin main 2>&1 | tail -3 >> "$LOG_FILE" + git push origin main 2>&1 >> "$LOG_FILE" echo "Pushed to Gitea" >> "$LOG_FILE" else echo "No changes to push" >> "$LOG_FILE"