Improve vendor CI/CD workflow with better messaging and auto-merge

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-08 20:52:20 +00:00
parent d61a4f7f36
commit be60888258
2 changed files with 137 additions and 16 deletions

View File

@@ -259,6 +259,8 @@ function Fetch-DownloadUrl {
}
$count = 0
$hasBreakingChanges = $false
$updateDetails = @()
# Read the current sources content
$sources = Get-Content $sourcesPath | Out-String | ConvertFrom-Json
@@ -301,6 +303,35 @@ foreach ($s in $sources) {
# }
$count++
# Analyze version change type
$changeType = "unknown"
try {
# Try parsing as semantic version
$oldVer = [System.Version]::Parse($s.version.Split('-')[0])
$newVer = [System.Version]::Parse($version.Split('-')[0])
if ($newVer.Major -gt $oldVer.Major) {
$changeType = "major"
$hasBreakingChanges = $true
} elseif ($newVer.Minor -gt $oldVer.Minor) {
$changeType = "minor"
} else {
$changeType = "patch"
}
} catch {
# If semantic versioning fails, treat as unknown (potentially breaking)
$changeType = "unknown"
$hasBreakingChanges = $true
Write-Verbose "Could not parse version as semantic version, treating as potentially breaking"
}
$updateDetails += @{
name = $s.name
oldVersion = $s.version
newVersion = $version
changeType = $changeType
}
}
$s.url = $downloadUrl
@@ -314,12 +345,16 @@ if ($count -eq 0) {
return
}
# Export update details for GitHub Actions
if ($Env:GITHUB_ACTIONS -eq 'true') {
$updateDetailsJson = $updateDetails | ConvertTo-Json -Compress
Write-Output "UPDATE_DETAILS=$updateDetailsJson" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
Write-Output "HAS_BREAKING_CHANGES=$hasBreakingChanges" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
Write-Output "::notice title=Task Complete::Successfully updated $count dependencies."
}
if ($Env:APPVEYOR -eq 'True') {
Add-AppveyorMessage -Message "Successfully updated $count dependencies." -Category Information
}
if ($Env:GITHUB_ACTIONS -eq 'true') {
Write-Output "::notice title=Task Complete::Successfully updated $count dependencies."
}
Write-Host -ForegroundColor green "Successfully updated $count dependencies."