Skip to content

Commit 50a2e91

Browse files
authored
Send valid JSON to autosync workflows for multi-line commit messages (#1981)
Allow multi-line commit message to be used in autosync workflows using the toJSON context function. The toJSON function is required to pretty-print JSON objects to the log.
1 parent bb7373e commit 50a2e91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/autoSyncMergedPullRequest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ jobs:
2828
"ref": "${{ github.ref }}",
2929
"prNumber": "${{ github.event.pull_request.number }}",
3030
"prTitle": "${{ github.event.pull_request.title }}",
31-
"prDescription": "${{ github.event.pull_request.description }}",
31+
"prDescription": "${{ toJSON(github.event.pull_request.description) }}",
3232
"sha": "${{ github.sha }}"
3333
}

.github/workflows/autoSyncSingleCommit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ jobs:
3232
{
3333
"ref": "${{ github.ref }}",
3434
"sha": "${{ github.sha }}",
35-
"commitMessage": "${{ github.event.commits[0].message }}"
35+
"commitMessage": "${{ toJSON(github.event.commits[0].message) }}"
3636
}

0 commit comments

Comments
 (0)