Fix trailing spaces in vendor workflow YAML

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-08 20:53:19 +00:00
parent be60888258
commit 4d21982f26

View File

@@ -51,14 +51,14 @@ jobs:
$oldVersion = ($currentVersion | Where-Object {$_.name -eq $s.name}).version
if ($s.version -ne $oldVersion) {
$repoUrl = ($repoUrl = $s.Url.Replace("/archive/", "/releases/")).Substring(0, $repoUrl.IndexOf("/releases/")) + "/releases"
# Determine change type and emoji
$changeType = "unknown"
$emoji = "🔄"
try {
$oldVer = [System.Version]::Parse($oldVersion.Split('-')[0])
$newVer = [System.Version]::Parse($s.version.Split('-')[0])
if ($newVer.Major -gt $oldVer.Major) {
$changeType = "major"
$emoji = "⚠️"
@@ -73,7 +73,7 @@ jobs:
$changeType = "unknown"
$emoji = "🔄"
}
$listUpdated += "$($s.name) v$($s.version), "
$updateMessage += "| $emoji **[$($s.name)]($repoUrl)** | \`$oldVersion\` | \`$($s.version)\` | $changeType |`n"
}
@@ -99,7 +99,7 @@ jobs:
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "$env:UPDATE_MESSAGE" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
# Check if we can auto-merge (only minor/patch changes)
$hasBreaking = $env:HAS_BREAKING_CHANGES -eq 'True'
if ($hasBreaking) {
@@ -117,22 +117,22 @@ jobs:
echo "### 🚀 Auto-merging Updates" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "Attempting to automatically merge non-breaking changes to master..." >> $env:GITHUB_STEP_SUMMARY
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Commit the changes
git add vendor/sources.json
git commit -m "⬆️ Update dependencies ($env:LIST_UPDATED)"
# Push directly to master
git push origin HEAD:master
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "✅ **Success!** Updates have been automatically merged to master." >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "**Updated dependencies:** $env:LIST_UPDATED" >> $env:GITHUB_STEP_SUMMARY
# Set a flag to skip PR creation
echo "AUTO_MERGED=true" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
} catch {
@@ -142,12 +142,12 @@ jobs:
echo "**Error:** $($_.Exception.Message)" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "Falling back to creating a pull request..." >> $env:GITHUB_STEP_SUMMARY
Write-Warning "Failed to auto-merge: $($_.Exception.Message)"
# Reset changes so PR creation can work
git reset --hard HEAD~1
# Set flag to create PR instead
echo "AUTO_MERGED=false" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
}
@@ -158,13 +158,13 @@ jobs:
title: ${{ env.COUNT_UPDATED == '1' && format('⬆️ Update {0}', env.LIST_UPDATED) || format('⬆️ Update {0} vendored dependencies', env.COUNT_UPDATED) }}
body: |
### ${{ env.COUNT_UPDATED == '1' && '📦 Automatically updated 1 dependency' || format('📦 Automatically updated {0} dependencies', env.COUNT_UPDATED) }}
${{ env.UPDATE_MESSAGE }}
---
${{ env.HAS_BREAKING_CHANGES == 'True' && '⚠️ **This update contains major version changes that may include breaking changes.**' || ' This update only contains minor or patch changes.' }}
Please verify and then **Merge** the pull request to apply the updates.
commit-message: '⬆️ Update dependencies (${{ env.LIST_UPDATED }})'
branch: update-vendor