From 7b418d1bc4077a0a86df5cd2594c3f67b4ee0dd5 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Thu, 7 Apr 2022 14:51:11 +0200 Subject: [PATCH] fix: get correct commit message and PR title for auto PRs --- .github/workflows/automatic-updates.yml | 5 +++-- build-automation.mjs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/automatic-updates.yml b/.github/workflows/automatic-updates.yml index 1717edf53d..c02a94b50b 100644 --- a/.github/workflows/automatic-updates.yml +++ b/.github/workflows/automatic-updates.yml @@ -16,6 +16,7 @@ jobs: uses: actions/github-script@v6 id: updt with: + result-encoding: string script: | const { default: script } = await import(`${process.env.GITHUB_WORKSPACE}/build-automation.mjs`); return script(github); @@ -28,8 +29,8 @@ jobs: author: "Node.js GitHub Bot " branch: update-branch base: main - commit-message: "feat: Node.js ${{ steps.updt.outputs.result.updatedVersionsString }}" - title: "feat: Node.js ${{ steps.updt.outputs.result.updatedVersionsString }}" + commit-message: "feat: Node.js ${{ steps.updt.outputs.result }}" + title: "feat: Node.js ${{ steps.updt.outputs.result }}" delete-branch: true team-reviewers: | @nodejs/docker diff --git a/build-automation.mjs b/build-automation.mjs index 3a8c538bec..d294326386 100644 --- a/build-automation.mjs +++ b/build-automation.mjs @@ -100,6 +100,6 @@ export default async function(github) { const { stdout } = (await exec(`git diff`)); console.log(stdout); - return { updatedVersions, updatedVersionsString: updatedVersions.join(', ') }; + return updatedVersions.join(', '); } }