Skip to content

Commit e6e0c70

Browse files
fix: give windows GHA job a pretty name + icon (#85)
1 parent d4d3585 commit e6e0c70

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/routes/release-build.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ const prettyCircleName = (workflow) => {
2424
}
2525
};
2626

27-
const prettyGitHubActionsName = (workflow) => {
27+
const prettyGitHubActionsNameAndIcon = (workflow) => {
2828
switch (workflow) {
2929
case 'linux-publish':
30-
return 'Linux';
30+
return { name: 'Linux', icon: 'linux' };
3131
case 'macos-publish':
32-
return 'macOS';
32+
return { name: 'macOS', icon: 'apple' };
33+
case 'windows-publish':
34+
return { name: 'Windows', icon: 'windows' };
3335
default:
34-
return workflow;
36+
return { name: workflow, icon: 'github' };
3537
}
3638
};
3739

@@ -70,11 +72,12 @@ router.get(
7072
});
7173
}
7274
for (const githubActionsBuild of build.ciBuilds.githubactions ?? []) {
75+
const { name, icon } = prettyGitHubActionsNameAndIcon(githubActionsBuild.buildJob);
7376
ciBuilds.push({
74-
name: prettyGitHubActionsName(githubActionsBuild.buildJob),
77+
name,
78+
icon,
7579
url: `https://github.com/electron/electron/actions/runs/${githubActionsBuild.buildId}`,
7680
status: githubActionsBuild.status,
77-
icon: githubActionsBuild.buildJob.includes('linux') ? 'linux' : 'apple',
7881
});
7982
}
8083
for (const appveyorBuild of build.ciBuilds.appveyor ?? []) {

0 commit comments

Comments
 (0)