mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-23 00:21:28 +00:00
fix(check): key check_run in-place edits on check name + head_sha
Providers that emit a fresh check run id per phase (e.g. Cloudflare Pages) no longer post a new message for each status change; same name + commit SHA now edits the existing message. Falls back to the run id when name or head_sha is absent. Docs updated in sync.
This commit is contained in:
parent
cc8bb4182f
commit
fd6ccda411
9 changed files with 47 additions and 8 deletions
|
|
@ -178,6 +178,7 @@ export function formatCheckRun(
|
|||
const checkRun = payload.check_run as {
|
||||
id?: number;
|
||||
name?: string;
|
||||
head_sha?: string;
|
||||
conclusion?: string;
|
||||
html_url?: string;
|
||||
details_url?: string;
|
||||
|
|
@ -225,7 +226,12 @@ export function formatCheckRun(
|
|||
url: checkRun.html_url,
|
||||
color: GITHUB_COLORS[colorKey],
|
||||
fields,
|
||||
updateKey: repo && checkRun.id != null ? `check_run:${repo}:${checkRun.id}` : undefined,
|
||||
updateKey:
|
||||
repo && checkRun.name && checkRun.head_sha
|
||||
? `check_run:${repo}:${checkRun.name}:${checkRun.head_sha}`
|
||||
: repo && checkRun.id != null
|
||||
? `check_run:${repo}:${checkRun.id}`
|
||||
: undefined,
|
||||
},
|
||||
t,
|
||||
repo,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue