From 570b1d604353b02b091bb3a98854328dc01a6881 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 01:09:41 +0000 Subject: [PATCH] Fix single dependency variable initialization to prevent CI failures Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com> --- .github/workflows/vendor.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 317f9d2..bc9cb0e 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -51,12 +51,15 @@ jobs: $singleDepName = "" $singleDepOldVersion = "" $singleDepNewVersion = "" + $updatedCount = 0 foreach ($s in $newVersion) { $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" - # Store single dependency info for messages + $updatedCount++ + + # Store single dependency info for messages (only if this is the only update) if ($count -eq 1) { $singleDepName = $s.name $singleDepOldVersion = $oldVersion @@ -119,6 +122,12 @@ jobs: } if ($count -eq 0) { return } Set-GHVariable -Name LIST_UPDATED -Value $listUpdated.Trim(', ') + # Ensure single dependency variables are set (use placeholder if empty) + if ([string]::IsNullOrEmpty($singleDepName)) { + $singleDepName = "dependency" + $singleDepOldVersion = "unknown" + $singleDepNewVersion = "unknown" + } Set-GHVariable -Name SINGLE_DEP_NAME -Value $singleDepName Set-GHVariable -Name SINGLE_DEP_OLD_VERSION -Value $singleDepOldVersion Set-GHVariable -Name SINGLE_DEP_NEW_VERSION -Value $singleDepNewVersion