Skip to content

Commit

Permalink
feat: Add websiteUrl for GitHub & OpenCollective (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
fb55 authored Feb 24, 2023
1 parent 40fbed9 commit bf88b34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/providers/github/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ export function makeQuery(login: string, type: string, cursor?: string) {
login
name
avatarUrl
websiteUrl
}
...on User {
login
name
avatarUrl
websiteUrl
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/providers/opencollective.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -128,6 +129,7 @@ function makeQuery(id?: string, slug?: string, githubHandle?: string, offset?: n
name
slug
type
website
isIncognito
imageUrl(height: 460, format: png)
}
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface Sponsor {
avatarUrlHighRes?: string
avatarUrlMediumRes?: string
avatarUrlLowRes?: string
websiteUrl?: string
linkUrl?: string
}

Expand Down

0 comments on commit bf88b34

Please sign in to comment.