github(summary): convert filename and build name to unicode

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2024-06-18 10:08:19 +02:00
parent e26a82d0aa
commit edcf239f49
No known key found for this signature in database
GPG Key ID: ADE44D8C9D44FBE4

View File

@ -237,7 +237,7 @@ export class GitHub {
.addRaw(addLink('Learn more', 'https://docs.docker.com/go/build-summary/')) .addRaw(addLink('Learn more', 'https://docs.docker.com/go/build-summary/'))
.addRaw('</p>') .addRaw('</p>')
.addRaw(`<p>`) .addRaw(`<p>`)
.addRaw(`:arrow_down: ${addLink(`<strong>${opts.uploadRes.filename}</strong>`, artifactRelativeURL)} (${Util.formatFileSize(opts.uploadRes.size)})`) .addRaw(`:arrow_down: ${addLink(`<strong>${Util.stringToUnicodeEntities(opts.uploadRes.filename)}</strong>`, artifactRelativeURL)} (${Util.formatFileSize(opts.uploadRes.size)})`)
.addBreak() .addBreak()
.addRaw(`This file includes <strong>${refsSize} build record${refsSize > 1 ? 's' : ''}</strong>.`) .addRaw(`This file includes <strong>${refsSize} build record${refsSize > 1 ? 's' : ''}</strong>.`)
.addRaw(`</p>`) .addRaw(`</p>`)
@ -264,7 +264,7 @@ export class GitHub {
// prettier-ignore // prettier-ignore
summaryTableData.push([ summaryTableData.push([
{data: `<code>${ref.substring(0, 6).toUpperCase()}</code>`}, {data: `<code>${ref.substring(0, 6).toUpperCase()}</code>`},
{data: `<strong>${summary.name}</strong>`}, {data: `<strong>${Util.stringToUnicodeEntities(summary.name)}</strong>`},
{data: `${summary.status === 'completed' ? ':white_check_mark:' : summary.status === 'canceled' ? ':no_entry_sign:' : ':x:'} ${summary.status}`}, {data: `${summary.status === 'completed' ? ':white_check_mark:' : summary.status === 'canceled' ? ':no_entry_sign:' : ':x:'} ${summary.status}`},
{data: `${summary.numCachedSteps > 0 ? Math.round((summary.numCachedSteps / summary.numTotalSteps) * 100) : 0}%`}, {data: `${summary.numCachedSteps > 0 ? Math.round((summary.numCachedSteps / summary.numTotalSteps) * 100) : 0}%`},
{data: summary.duration} {data: summary.duration}