mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
build: sort artifacts in PR comments
This commit is contained in:
parent
d9df2a5da1
commit
483ccb62cd
1 changed files with 6 additions and 5 deletions
11
.github/workflows/comment_build.yml
vendored
11
.github/workflows/comment_build.yml
vendored
|
@ -138,11 +138,12 @@ jobs:
|
|||
}
|
||||
|
||||
// Construct the comment body
|
||||
let body = allArtifacts.reduce((acc, item) => {
|
||||
if (item.name === "assets") return acc;
|
||||
acc += `\n* [${item.name}.zip](https://nightly.link/${context.repo.owner}/${context.repo.repo}/actions/artifacts/${item.id}.zip)`;
|
||||
return acc;
|
||||
}, 'Download the built assets for this pull request:\n');
|
||||
let body = 'Download the built assets for this pull request:\n' +
|
||||
allArtifacts
|
||||
.filter(item => item.name !== "assets")
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
.map(item => `* [${item.name}.zip](https://nightly.link/${context.repo.owner}/${context.repo.repo}/actions/artifacts/${item.id}.zip)`)
|
||||
.join('\n');
|
||||
|
||||
// Upsert the comment on the PR
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue