mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-02 13:36:42 +02:00
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:
+1
-1
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user