From 4264158ff2cd65a486dee184fabb57b78bd6b4b6 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Mon, 17 Oct 2022 22:14:00 +0330 Subject: [PATCH] attempt to fix new lines for PR message --- .github/workflows/vendor.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/vendor.yml b/.github/workflows/vendor.yml index 0802593..8a51ab0 100644 --- a/.github/workflows/vendor.yml +++ b/.github/workflows/vendor.yml @@ -28,7 +28,8 @@ jobs: with: fetch-depth: 0 - - run: | + - id: make-changes + run: | $currentVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) . .\scripts\update.ps1 -verbose Set-GHVariable -Name COUNT_UPDATED -Value $count @@ -39,18 +40,21 @@ jobs: $oldVersion = ($currentVersion | Where-Object {$_.name -eq $s.name}).version if ($s.version -ne $oldVersion) { $listUpdated += "$($s.name), " - $updateMessage += "| **$($s.name)** | $oldVersion | **$($s.version)**|`n" + $updateMessage += "| **$($s.name)** | $oldVersion | **$($s.version)** |`n" } } Set-GHVariable -Name LIST_UPDATED -Value $listUpdated.Trim(', ') - Set-GHVariable -Name UPDATE_MESSAGE -Value $updateMessage.Replace("`n", "%0a") + $updateMessage = $updateMessage.Replace("%", "%25") + $updateMessage = $updateMessage.Replace("`r", "%0d") + $updateMessage = $updateMessage.Replace("`n", "%0a") + Write-Host "::set-output name=updateMessage::$updateMessage" - uses: peter-evans/create-pull-request@v4 with: title: 'Updates to `${{ env.COUNT_UPDATED }}` vendored dependencies' body: | ### Automatically updated `${{ env.COUNT_UPDATED }}` dependencies: - ${{ env.UPDATE_MESSAGE }} + ${{ steps.make_changes.outputs.updateMessage }} --- Please verify and then **Merge** the pull request to update. commit-message: 'Update vendored dependencies (${{ env.LIST_UPDATED }})'