mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
chore: auto-fix lint & formatting [skip ci]
This commit is contained in:
1 parent
e607d41432
commit
ae36c22fda
2 files changed
+16
-5
No files matched your search
@@ -155,7 +155,7 @@ export function formatWorkflowRun(
|
|||||||
? "running"
|
? "running"
|
||||||
: j.status === "queued"
|
: j.status === "queued"
|
||||||
? "queued"
|
? "queued"
|
||||||
: j.conclusion ?? "pending";
|
: (j.conclusion ?? "pending");
|
||||||
const emoji = WORKFLOW_CONCLUSION_EMOJI[status] ?? "⏳";
|
const emoji = WORKFLOW_CONCLUSION_EMOJI[status] ?? "⏳";
|
||||||
const marker =
|
const marker =
|
||||||
status === "success"
|
status === "success"
|
||||||
@@ -163,8 +163,7 @@ export function formatWorkflowRun(
|
|||||||
: status === "running" || status === "queued" || status === "pending"
|
: status === "running" || status === "queued" || status === "pending"
|
||||||
? " "
|
? " "
|
||||||
: "-";
|
: "-";
|
||||||
const done =
|
const done = status !== "running" && status !== "queued" && status !== "pending";
|
||||||
status !== "running" && status !== "queued" && status !== "pending";
|
|
||||||
const duration = done ? jobDuration(j.started_at, j.completed_at) : undefined;
|
const duration = done ? jobDuration(j.started_at, j.completed_at) : undefined;
|
||||||
return `${marker} ${cap(j.name ?? "", 200)} ${em(emoji)}${status}${duration ? ` · ${duration}` : ""}`;
|
return `${marker} ${cap(j.name ?? "", 200)} ${em(emoji)}${status}${duration ? ` · ${duration}` : ""}`;
|
||||||
});
|
});
|
||||||
|
|||||||
+14
-2
@@ -165,10 +165,22 @@ describe("message title spec", () => {
|
|||||||
html_url: "https://github.com/acme/widget/actions/runs/42",
|
html_url: "https://github.com/acme/widget/actions/runs/42",
|
||||||
run_number: 42,
|
run_number: 42,
|
||||||
jobs: [
|
jobs: [
|
||||||
{ name: "build", status: "completed", conclusion: "success", started_at: "2024-01-01T00:00:00Z", completed_at: "2024-01-01T00:01:23Z" },
|
{
|
||||||
|
name: "build",
|
||||||
|
status: "completed",
|
||||||
|
conclusion: "success",
|
||||||
|
started_at: "2024-01-01T00:00:00Z",
|
||||||
|
completed_at: "2024-01-01T00:01:23Z",
|
||||||
|
},
|
||||||
{ name: "deploy", status: "in_progress", conclusion: null },
|
{ name: "deploy", status: "in_progress", conclusion: null },
|
||||||
{ name: "lint", status: "queued", conclusion: null },
|
{ name: "lint", status: "queued", conclusion: null },
|
||||||
{ name: "test", status: "completed", conclusion: "failure", started_at: "2024-01-01T00:00:00Z", completed_at: "2024-01-01T00:00:45Z" },
|
{
|
||||||
|
name: "test",
|
||||||
|
status: "completed",
|
||||||
|
conclusion: "failure",
|
||||||
|
started_at: "2024-01-01T00:00:00Z",
|
||||||
|
completed_at: "2024-01-01T00:00:45Z",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
repository: repo,
|
repository: repo,
|
||||||
|
|||||||
Reference in new issue
Block a user