chore: fix vue-tsc error in ci-tools conditional header spread

`body` is `unknown`, so `...(body && {...})` spreads a string-including
union and fails vue-tsc (TS2698). `Boolean(body)` keeps the spread
object-only while preserving the runtime behavior.

Assisted-by: claude-code:opus-4.8
This commit is contained in:
silverwind
2026-06-17 07:10:35 +02:00
parent 767ed117e2
commit 8990a3dcbd
+1 -1
View File
@@ -83,7 +83,7 @@ async function setPrLabels(): Promise<void> {
Accept: 'application/vnd.github+json',
Authorization: `Bearer ${env.GITHUB_TOKEN}`,
'X-GitHub-Api-Version': '2022-11-28',
...(body && {'Content-Type': 'application/json'}),
...(Boolean(body) && {'Content-Type': 'application/json'}),
},
body: body ? JSON.stringify(body) : undefined,
});