diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index 2b95f07..e23b656 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -12,7 +12,8 @@ concurrency: cancel-in-progress: true jobs: - check-and-fix: + lint-format: + name: Lint & Format Fix runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" steps: diff --git a/src/formatter.ts b/src/formatter.ts index 0590d22..ac6102b 100644 --- a/src/formatter.ts +++ b/src/formatter.ts @@ -497,6 +497,7 @@ function formatWorkflowRun( created_at?: string; updated_at?: string; elapsed_seconds?: number; + jobs?: Array<{ name?: string; conclusion?: string }>; }; const conclusion = workflow.conclusion ?? "pending"; @@ -516,6 +517,17 @@ function formatWorkflowRun( inline: true, }); + if (workflow.jobs?.length) { + const jobLines = workflow.jobs.map( + (j) => `${WORKFLOW_CONCLUSION_EMOJI[j.conclusion ?? ""] ?? "⏳"} ${j.name ?? ""}`, + ); + fields.push({ + name: t("fields.job"), + value: jobLines.join("\n"), + inline: false, + }); + } + if (workflow.head_branch) { fields.push({ name: t("fields.branch"), diff --git a/src/locales/en.ts b/src/locales/en.ts index 69f0a0d..6a011cc 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -47,6 +47,7 @@ export const en = { milestone: "Milestone", status: "Status", run: "Run", + job: "Job", duration: "Duration", type: "Type", name: "Name", diff --git a/src/locales/zh.ts b/src/locales/zh.ts index 95af9dd..1303ead 100644 --- a/src/locales/zh.ts +++ b/src/locales/zh.ts @@ -47,6 +47,7 @@ export const zh = { milestone: "里程碑", status: "状态", run: "运行", + job: "作业", duration: "耗时", type: "类型", name: "名称",