Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

Commit c78c00b

Browse files
committed
Enhance fork detection logic in PR object creation to ensure accurate identification of forks
1 parent 03b935a commit c78c00b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

code-review-chat/CodeReviewChat.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

code-review-chat/CodeReviewChat.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ export function createPRObject(pullRequestFromApi: any): PR {
7575
headBranchName: pullRequestFromApi.head.ref ?? '',
7676
title: pullRequestFromApi.title,
7777
headLabel: pullRequestFromApi.head.repo?.full_name || '',
78-
fork: pullRequestFromApi.head.repo?.fork || false,
78+
fork:
79+
(pullRequestFromApi.head.repo?.fork &&
80+
pullRequestFromApi.head.repo.full_name != pullRequestFromApi.base.repo.full_name) ||
81+
false,
7982
};
8083
return pr;
8184
}

0 commit comments

Comments
 (0)