From 50a2e911f2959e8624b549216b1df67961727a6c Mon Sep 17 00:00:00 2001 From: Octavian FlowiseAI <154992625+ocflowiseai@users.noreply.github.com> Date: Mon, 18 Mar 2024 09:09:21 +0100 Subject: [PATCH] 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. --- .github/workflows/autoSyncMergedPullRequest.yml | 2 +- .github/workflows/autoSyncSingleCommit.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autoSyncMergedPullRequest.yml b/.github/workflows/autoSyncMergedPullRequest.yml index a1f1fc33b..275520f4b 100644 --- a/.github/workflows/autoSyncMergedPullRequest.yml +++ b/.github/workflows/autoSyncMergedPullRequest.yml @@ -28,6 +28,6 @@ jobs: "ref": "${{ github.ref }}", "prNumber": "${{ github.event.pull_request.number }}", "prTitle": "${{ github.event.pull_request.title }}", - "prDescription": "${{ github.event.pull_request.description }}", + "prDescription": "${{ toJSON(github.event.pull_request.description) }}", "sha": "${{ github.sha }}" } diff --git a/.github/workflows/autoSyncSingleCommit.yml b/.github/workflows/autoSyncSingleCommit.yml index 0a8c78148..7d0356b91 100644 --- a/.github/workflows/autoSyncSingleCommit.yml +++ b/.github/workflows/autoSyncSingleCommit.yml @@ -32,5 +32,5 @@ jobs: { "ref": "${{ github.ref }}", "sha": "${{ github.sha }}", - "commitMessage": "${{ github.event.commits[0].message }}" + "commitMessage": "${{ toJSON(github.event.commits[0].message) }}" }