Skip to content

Commit 88d486a

Browse files
committed
Fix TypeScript error in pull-requests.ts
- Handle optional patch property correctly with exactOptionalPropertyTypes - Use conditional spread operator to only include patch when present
1 parent ea3b8e0 commit 88d486a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pull-requests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,6 @@ export async function getPullRequestFiles({
203203
additions: file.additions,
204204
deletions: file.deletions,
205205
changes: file.changes,
206-
patch: file.patch,
206+
...(file.patch && { patch: file.patch }),
207207
}));
208208
}

0 commit comments

Comments
 (0)