mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-23 00:21:28 +00:00
feat(formatters): add updateKey for suite/deployment/comment edit-in-place
This commit is contained in:
parent
3af50496a7
commit
2f8a87048e
4 changed files with 12 additions and 0 deletions
|
|
@ -42,6 +42,7 @@ export function formatDeployment(
|
|||
showEmoji: boolean,
|
||||
): NeutralMessage {
|
||||
const deployment = payload.deployment as {
|
||||
id?: number;
|
||||
environment?: string;
|
||||
ref?: string;
|
||||
sha?: string;
|
||||
|
|
@ -88,6 +89,7 @@ export function formatDeployment(
|
|||
}),
|
||||
url: deployment.html_url ?? deployment.statuses_url,
|
||||
color: GITHUB_COLORS.deployment_pending,
|
||||
updateKey: repo && deployment.id != null ? `deployment:${repo}:${deployment.id}` : undefined,
|
||||
fields,
|
||||
},
|
||||
t,
|
||||
|
|
@ -109,6 +111,7 @@ export function formatDeploymentStatus(
|
|||
description?: string;
|
||||
};
|
||||
const deployment = payload.deployment as {
|
||||
id?: number;
|
||||
sha?: string;
|
||||
ref?: string;
|
||||
environment?: string;
|
||||
|
|
@ -163,6 +166,7 @@ export function formatDeploymentStatus(
|
|||
author,
|
||||
title: t("events.deployment.title", { repo: repo ?? t("common.repository"), env, state }),
|
||||
color: GITHUB_COLORS[colorKey],
|
||||
updateKey: repo && deployment.id != null ? `deployment:${repo}:${deployment.id}` : undefined,
|
||||
fields,
|
||||
},
|
||||
t,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue