From 75b46c846fa21bf137d16b29b39dec88217f1b8f Mon Sep 17 00:00:00 2001 From: xudan Date: Wed, 18 Jun 2025 08:59:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8=E5=90=8C=E6=AD=A5=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E8=84=9A=E6=9C=AC=E4=B8=AD=E6=B7=BB=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=90=88=E5=B9=B6=E6=B6=88=E6=81=AF=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E5=90=88=E5=B9=B6=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 自动同步仓库.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/自动同步仓库.ps1 b/自动同步仓库.ps1 index 03d8613..550cf40 100644 --- a/自动同步仓库.ps1 +++ b/自动同步仓库.ps1 @@ -74,14 +74,19 @@ function Sync-Repositories { } else { Write-ColorOutput "正在使用merge合并代码..." "Green" if (-not $DryRun) { - git merge upstream/master + # 生成自动合并消息 + $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" + $mergeMessage = "feat: 同步上游仓库更新 ($timestamp)" + + git merge upstream/master --no-edit -m $mergeMessage if ($LASTEXITCODE -ne 0) { Write-ColorOutput "Merge失败!请手动解决冲突后再继续。" "Red" Write-ColorOutput "解决冲突后请运行: git commit" "Yellow" return } + Write-ColorOutput "使用自动合并消息: $mergeMessage" "Gray" } else { - Write-ColorOutput "[预览模式] git merge upstream/master" "Gray" + Write-ColorOutput "[预览模式] git merge upstream/master --no-edit -m '自动合并消息'" "Gray" } }