feat(workflow): render workflow_run jobs as colored diff block

List each job on its own line with a status emoji and, for completed
jobs, the duration. Discord colors the diff fence: '+' green for
success, '-' red for other finished conclusions, plain for
running/queued/pending. Telegram/Feishu collapse it to inline code.

Sync AGENTS.md, README(s), docs guide and supported-events tables.
This commit is contained in:
RhenCloud committed 2026-09-26 14:58:00 +08:00
1 parent 4e81d3d4da
commit e607d41432
9 files changed
+109 -12

No files matched your search

+5
View File
@@ -197,6 +197,11 @@ tests/__snapshots__/ # formatter snapshot golden files (toMatchSnapshot)
the locale files. Emoji is controlled per group through the `Group.emoji` toggle (default true);
`showEmoji=false` must strip every emoji from titles, descriptions, fields and links.
- Milestone progress bars (🟢🟡🟠⬜) are data visualization and are exempt from the emoji toggle.
- `workflow_run` messages render a **Jobs** field as a Discord `diff` fenced code block
(`server/lib/formatters/workflow.ts`): one line per job, `${marker} ${name} ${emoji}${status}` plus
` · {duration}` for completed jobs. `+` (green) for `success`, `-` (red) for other non-pending
conclusions, a plain space for running/queued/pending; job names clamp to 200 chars and the field
to the platform field limit. Drivers without diff support (Telegram, Feishu) collapse it to inline code.
- Commit hashes, branches and tags render as inline code wrapped in a hyperlink
(`commitLink`/`branchLink`/`tagLink` helpers in `server/lib/formatters/helpers.ts`, e.g.
``[`abc123d`](https://.../commit/abc123def456)``, ``[`main`](https://.../tree/main)``),