Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,15 @@ export async function fetchCollaboratorsForYear(
const collaboratorMap = new Map<string, CollaboratorData>();
const collection = data.user.contributionsCollection;

// If the user doesn't have contributions
if (!collection) {
return [];
}

// Process PR contributors
for (const pr of collection.pullRequestContributions?.nodes ?? []) {
// Skip if pullRequest is null (deleted PRs)
if (!pr.pullRequest) continue;
if (!pr || !pr.pullRequest) continue;

if (pr.pullRequest.author && pr.pullRequest.author.login !== username) {
const login = pr.pullRequest.author.login;
Expand Down