feat: edit existing messages for workflow run updates

This commit is contained in:
RhenCloud 2026-08-03 09:43:36 +08:00
parent 4b3f5189a8
commit 78f0a4e28a
No known key found for this signature in database
GPG key ID: A574A617378C4E0B
8 changed files with 187 additions and 16 deletions

View file

@ -100,6 +100,7 @@ export function formatWorkflowRun(
showEmoji: boolean,
): NeutralMessage {
const workflow = payload.workflow_run as {
id?: number;
name?: string;
conclusion?: string;
html_url?: string;
@ -183,6 +184,8 @@ export function formatWorkflowRun(
url: workflow.html_url,
color: GITHUB_COLORS[colorKey],
fields,
updateKey:
repo && workflow.id != null ? `workflow_run:${repo}:${workflow.id}` : undefined,
},
t,
repo,