attempt to fix new lines for PR message

This commit is contained in:
David Refoua 2022-10-17 22:14:00 +03:30
parent 0559060ceb
commit 4264158ff2

View File

@ -28,7 +28,8 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- run: | - id: make-changes
run: |
$currentVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json) $currentVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json)
. .\scripts\update.ps1 -verbose . .\scripts\update.ps1 -verbose
Set-GHVariable -Name COUNT_UPDATED -Value $count Set-GHVariable -Name COUNT_UPDATED -Value $count
@ -43,14 +44,17 @@ jobs:
} }
} }
Set-GHVariable -Name LIST_UPDATED -Value $listUpdated.Trim(', ') 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 - uses: peter-evans/create-pull-request@v4
with: with:
title: 'Updates to `${{ env.COUNT_UPDATED }}` vendored dependencies' title: 'Updates to `${{ env.COUNT_UPDATED }}` vendored dependencies'
body: | body: |
### Automatically updated `${{ env.COUNT_UPDATED }}` dependencies: ### Automatically updated `${{ env.COUNT_UPDATED }}` dependencies:
${{ env.UPDATE_MESSAGE }} ${{ steps.make_changes.outputs.updateMessage }}
--- ---
Please verify and then **Merge** the pull request to update. Please verify and then **Merge** the pull request to update.
commit-message: 'Update vendored dependencies (${{ env.LIST_UPDATED }})' commit-message: 'Update vendored dependencies (${{ env.LIST_UPDATED }})'