-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid downloading avtars everytime on docs:dev #4603
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d2e6202
Avoid downloading avtars everytime on docs:dev
sidharthv96 c17dc15
chore: Rename to teamMembers
sidharthv96 4805033
Merge branch 'develop' into sidv/optimiseDocs
sidharthv96 d4281d3
Add Yokozuna59 & nirname
sidharthv96 bcffff3
Terminate build in CI if download fails
sidharthv96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sidharthv96 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
export interface Contributor { | ||
name: string; | ||
avatar: string; | ||
} | ||
|
||
export interface SocialEntry { | ||
icon: string | { svg: string }; | ||
link: string; | ||
} | ||
|
||
export interface CoreTeam { | ||
name: string; | ||
// required to download avatars from GitHub | ||
github: string; | ||
avatar?: string; | ||
twitter?: string; | ||
mastodon?: string; | ||
sponsor?: string; | ||
website?: string; | ||
linkedIn?: string; | ||
title?: string; | ||
org?: string; | ||
desc?: string; | ||
links?: SocialEntry[]; | ||
} | ||
|
||
export const knut: CoreTeam = { | ||
github: 'knsv', | ||
name: 'Knut Sveidqvist', | ||
title: 'Creator', | ||
twitter: 'knutsveidqvist', | ||
sponsor: 'https://github.com/sponsors/knsv', | ||
}; | ||
|
||
export const plainTeamMembers: CoreTeam[] = [ | ||
{ | ||
github: 'NeilCuzon', | ||
name: 'Neil Cuzon', | ||
}, | ||
{ | ||
github: 'tylerlong', | ||
name: 'Tyler Liu', | ||
}, | ||
{ | ||
github: 'sidharthv96', | ||
name: 'Sidharth Vinod', | ||
twitter: 'sidv42', | ||
mastodon: 'https://techhub.social/@sidv', | ||
sponsor: 'https://github.com/sponsors/sidharthv96', | ||
linkedIn: 'sidharth-vinod', | ||
website: 'https://sidharth.dev', | ||
}, | ||
{ | ||
github: 'ashishjain0512', | ||
name: 'Ashish Jain', | ||
}, | ||
{ | ||
github: 'mmorel-35', | ||
name: 'Matthieu Morel', | ||
linkedIn: 'matthieumorel35', | ||
}, | ||
{ | ||
github: 'aloisklink', | ||
name: 'Alois Klink', | ||
linkedIn: 'aloisklink', | ||
website: 'https://aloisklink.com', | ||
}, | ||
{ | ||
github: 'pbrolin47', | ||
name: 'Per Brolin', | ||
}, | ||
{ | ||
github: 'Yash-Singh1', | ||
name: 'Yash Singh', | ||
}, | ||
{ | ||
github: 'GDFaber', | ||
name: 'Marc Faber', | ||
linkedIn: 'marc-faber', | ||
}, | ||
{ | ||
github: 'MindaugasLaganeckas', | ||
name: 'Mindaugas Laganeckas', | ||
}, | ||
{ | ||
github: 'jgreywolf', | ||
name: 'Justin Greywolf', | ||
}, | ||
{ | ||
github: 'IOrlandoni', | ||
name: 'Nacho Orlandoni', | ||
}, | ||
{ | ||
github: 'huynhicode', | ||
name: 'Steph Huynh', | ||
}, | ||
{ | ||
github: 'Yokozuna59', | ||
name: 'Reda Al Sulais', | ||
}, | ||
{ | ||
github: 'nirname', | ||
name: 'Nikolay Rozhkov', | ||
}, | ||
]; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should probably modify the
download()
function so that it's doesn't run fully in parallel. Every time I try to download the avatars, GitHub seems to block my computer from accessing GitHub for a few minutes 😆We should also set the appropriate HTTP headers for GitHub's API.
We could also install a JavaScript client to download the avatar, which should handle rate-limiting, headers, auth, etc. all for us. The only problem is that there doesn't seem to be a REST API JavaScript client that can download the avatar. Only the GraphQL API has an
avatarUrl
field: https://docs.github.com/en/graphql/reference/objects#userThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was, I was tired of waiting and replaced it with parallel version. We need either to satisfy GH rate limit, or may be refuse from downloading avatars in local dev at all, or limit them like to 10 only, that would be enough for debugging and visual purposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least in CI, there's a
GITHUB_TOKEN
environment variable that can be used with the API to heavily reduce rate limits. :)I'd be 👍 to just downloading the first 10 pictures, then replacing all the other avatars with a dummy picture, like