Skip to content

Commit

Permalink
Enhance contributor type guard to include additional properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromehardaway committed Jan 7, 2025
1 parent 140646c commit dbaedc7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ const octokit = new Octokit({
});

function isVWCContributor(c: any): c is VWCContributor {
return c !== null && "login" in c && "name" in c;
return (
c !== null &&
"login" in c &&
"name" in c &&
"id" in c &&
"avatar_url" in c &&
"html_url" in c &&
"contributions" in c
);
}

async function rateLimit() {
Expand Down

0 comments on commit dbaedc7

Please sign in to comment.