Skip to content

Commit 58bbb99

Browse files
committed
fix: always tag PRs with pull_request; avoid misclassifying open PRs as issues
1 parent b5b4b5e commit 58bbb99

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/hooks/useGitHubData.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ export const useGitHubData = (getOctokit: () => any) => {
6868
state: n.state,
6969
repository_url: n.repository.url,
7070
};
71-
return n.mergedAt ? { ...base, pull_request: { merged_at: n.mergedAt } } : base;
71+
// Always tag PRs with a pull_request marker; merged_at may be null for open PRs
72+
if (type === 'pr') {
73+
return { ...base, pull_request: { merged_at: n.mergedAt ?? null } };
74+
}
75+
return base;
7276
});
7377

7478
// cache cursor for pagination (keyed by username + page size)

0 commit comments

Comments
 (0)