From bf88b34710bee7a61c5bdd87874db4e10def1786 Mon Sep 17 00:00:00 2001 From: Felix <188768+fb55@users.noreply.github.com> Date: Fri, 24 Feb 2023 13:26:58 +0000 Subject: [PATCH] feat: Add `websiteUrl` for GitHub & OpenCollective (#37) --- src/providers/github/index.ts | 2 ++ src/providers/opencollective.ts | 2 ++ src/types.ts | 1 + 3 files changed, 5 insertions(+) diff --git a/src/providers/github/index.ts b/src/providers/github/index.ts index 404a604..67dc256 100644 --- a/src/providers/github/index.ts +++ b/src/providers/github/index.ts @@ -110,11 +110,13 @@ export function makeQuery(login: string, type: string, cursor?: string) { login name avatarUrl + websiteUrl } ...on User { login name avatarUrl + websiteUrl } } } diff --git a/src/providers/opencollective.ts b/src/providers/opencollective.ts index 5b66a1b..308ff8d 100644 --- a/src/providers/opencollective.ts +++ b/src/providers/opencollective.ts @@ -83,6 +83,7 @@ export async function fetchOpenCollectiveSponsors(key?: string, id?: string, slu type: (collective ? v.account.type : v.oppositeAccount.name) === 'INDIVIDUAL' ? 'User' : 'Organization', login: slug, avatarUrl: collective ? v.account.imageUrl : v.oppositeAccount.imageUrl, + websiteUrl: collective ? v.account.website : v.oppositeAccount.website, linkUrl: `https://opencollective.com/${slug}`, }, isOneTime: !v.tier || v.tier.type === 'DONATION', @@ -128,6 +129,7 @@ function makeQuery(id?: string, slug?: string, githubHandle?: string, offset?: n name slug type + website isIncognito imageUrl(height: 460, format: png) } diff --git a/src/types.ts b/src/types.ts index 4167953..6f5a32e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -31,6 +31,7 @@ export interface Sponsor { avatarUrlHighRes?: string avatarUrlMediumRes?: string avatarUrlLowRes?: string + websiteUrl?: string linkUrl?: string }