From abca6e12f75875a2edf5602e75ca62207f72513e Mon Sep 17 00:00:00 2001 From: ModEngineer <43882205+ModEngineer@users.noreply.github.com> Date: Thu, 14 Apr 2022 11:32:54 -0500 Subject: [PATCH] Update publish-release.yml --- .github/workflows/publish-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 415b95c..8c6d2f3 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -50,12 +50,12 @@ jobs: if (releaseListResponse.data[0].target_commitish.match(/[0-9a-f]{40}/i)) { const hashes = child_process.execSync(`git log --pretty='format:%H' ...${releaseListResponse.data[0].target_commitish}`, {cwd: process.env.GITHUB_WORKSPACE}).toString().split('\n') console.log(hashes) - if (hashes.length > 0) { + if (hashes != [""]) { textBody += " Commit messages and descriptions since the last release are shown below:" - for (const hash in hashes) { + for (const hash of hashes) { textBody += '\n- ' + child_process.execSync(`git log --pretty='format:%s' -n 1 ${hash}`, {cwd: process.env.GITHUB_WORKSPACE}).toString() let commitBodyLines = child_process.execSync(`git log --pretty='format:%b' -n 1 ${hash}`, {cwd: process.env.GITHUB_WORKSPACE}).toString() - for (const line in commitBodyLines) { + for (const line of commitBodyLines) { textBody += '\n ' + line } }