Skip to content

Commit 3f3d8b7

Browse files
dakixrclaude
andcommitted
fix(git): accept an absent head commit under exact optional properties
`ChangeRequest.headRefOid` is a `Schema.optional` field, so its type admits an explicit `undefined`. `PullRequestInfo` declared it as `string | null`, which `exactOptionalPropertyTypes` rejects once a mapped change request is spread into it — as the Forgejo head-matching test now does. Widen it the way the neighbouring `PullRequestHeadRemoteInfo` fields already are. Co-Authored-By: Claude Opus 5 <[email protected]>
1 parent 1e05423 commit 3f3d8b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/server/src/git/GitManager.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ interface PullRequestInfo extends OpenPrInfo, PullRequestHeadRemoteInfo {
197197
closedAt?: string | null;
198198
mergedAt?: string | null;
199199
updatedAt: Option.Option<DateTime.Utc>;
200-
headRefOid?: string | null;
200+
headRefOid?: string | null | undefined;
201201
}
202202

203203
const pullRequestUpdatedAtDescOrder: Order.Order<PullRequestInfo> = Order.mapInput(

0 commit comments

Comments
 (0)