Skip to content

Commit 0af6178

Browse files
committed
open-pr: avoid bogus undefined inside the PR description
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 30fdb59 commit 0af6178

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/open-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jobs:
177177
with:
178178
github-token: ${{ steps.setup.outputs.token }}
179179
script: |
180-
let body = undefined
180+
let body = ''
181181
try {
182182
const name = process.env.PACKAGE_TO_UPGRADE
183183
const version = `${name.match(/git-lfs/) ? 'v' : ''}${process.env.UPGRADE_TO_VERSION}`
@@ -189,7 +189,7 @@ jobs:
189189
const { data } = await github.rest.search.issuesAndPullRequests({
190190
q: `"[New ${name.replace(/^mingw-w64-/, '')} version]" ${version} in:title ${terms}`,
191191
})
192-
if (data.total_count) body = `${body && `${body}\n\n`}This closes ${data.items[0].html_url}`
192+
if (data.total_count) body = `${body ? `${body}\n\n` : ''}This closes ${data.items[0].html_url}`
193193
} catch (e) {
194194
console.log(e)
195195
}

0 commit comments

Comments
 (0)