Skip to content

Commit

Permalink
linters were a mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Apr 20, 2024
1 parent d08b247 commit b2c1102
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/webserver/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,26 @@ const actionCompleted = async (client: Client, req: Request) => {
githubMap.get(workflow_run.id)!
);

let versionOrVersionAndLogs = `Version: **${version}**`
let versionOrVersionAndLogs = `Version: **${version}**`;

if (!workflow_run.conclusion) {
const runId = workflow_run.id
const jobId: string = await fetch(`https://api.github.com/repos/Layers-of-Railways/Railway/actions/runs/${runId}/jobs`)
.then(response => response.json())
.then(data => {
const runId = workflow_run.id;
const jobId: string = await fetch(
`https://api.github.com/repos/Layers-of-Railways/Railway/actions/runs/${runId}/jobs`
)
.then((response) => response.json())
.then((data) => {
if (data.jobs && data.jobs.length > 0) {
return data.jobs[0].id;
} else {
return "error"
return 'error';
}
})
const logsUrl = `https://github.com/Layers-of-Railways/Railway/actions/runs/${workflow_run.id}/job/${jobId}`
});
const logsUrl = `https://github.com/Layers-of-Railways/Railway/actions/runs/${workflow_run.id}/job/${jobId}`;

versionOrVersionAndLogs += `[Run logs](${logsUrl})`
versionOrVersionAndLogs += `[Run logs](${logsUrl})`;
}


const embed = new EmbedBuilder()
.setAuthor({
name: `${repository.name}/${workflow_run.head_branch}`,
Expand Down

0 comments on commit b2c1102

Please sign in to comment.