Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion tools/add-author.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function fetchUserProfile() {
name: profile.name,
title: "Guest Author",
website: profile.blog,
avatar_url: profile.avatar_url,
avatar_url: `${profile.avatar_url.replace("private-", "").split("?")[0]}?v=4`,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
avatar_url: `${profile.avatar_url.replace("private-", "").split("?")[0]}?v=4`,
avatar_url: `${profile.avatar_url.replace("private-", "").split("?")[0]}?v=4`,

We could consider adding a fallback image in case the actual image isn't found, though I'm not sure if GitHub itself provides a fallback image.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good to me, should we use the fallback image which we are using for sponsors? this one
Screenshot 2024-12-21 170645

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am 👍 let's get other's opinions too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fallback also looks good to me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added fallback image.

bio: profile.bio,
twitter_username: profile.twitter_username,
github_username: profile.login,
Expand Down
4 changes: 2 additions & 2 deletions tools/fetch-sponsors.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ async function fetchGitHubSponsors() {
// return an array in the same format as Open Collective
.map(({ sponsor, tier }) => ({
name: sponsor.name || sponsor.login,
image: sponsor.avatarUrl,
image: `${sponsor.avatarUrl.replace("private-", "").split("?")[0]}?v=4`,
url: fixUrl(sponsor.websiteUrl || sponsor.url),
monthlyDonation: tier.monthlyPriceInDollars,
source: "github",
Expand All @@ -365,7 +365,7 @@ async function fetchGitHubSponsors() {
.map(({ sponsor, timestamp, tier, id }) => ({
id,
name: sponsor.name || sponsor.login,
image: sponsor.avatarUrl,
image: `${sponsor.avatarUrl.replace("private-", "").split("?")[0]}?v=4`,
url: fixUrl(sponsor.websiteUrl || sponsor.url),
amount: tier.monthlyPriceInDollars,
date: timestamp,
Expand Down
2 changes: 1 addition & 1 deletion tools/fetch-team-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async function fetchUserProfile(username) {
: profile.blog
? `https://${profile.blog}`
: profile.blog,
avatar_url: profile.avatar_url,
avatar_url: `${profile.avatar_url.replace("private-", "").split("?")[0]}?v=4`,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we extract this into a shared place (e.g., tools/utils.js) as a function so that we don't have to repeat the same logic in multiple files?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! tools/utils.js has been created.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some URLs have u parameter:

"name": "Workleap",
"image": "https://avatars.githubusercontent.com/u/53535748?u=d1e55d7661d724bf2281c1bfd33cb8f99fe2465f&v=4",

Any ideas about what it represents?

Should we maybe remove just the jwt parameter and leave the others?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some URLs have u parameter:

Can it stands for unique? even though without this parameter the results are same.

Also seems links are already fixed by commit e385d5f should we still apply this fix?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also seems links are already fixed by commit e385d5f should we still apply this fix?

I also noticed that it might be a good idea to wait a couple of days. If GitHub is still testing features with a subset of users, it could potentially break again. As of now, we might not be part of the experiment, but if they do a full rollout, we could be impacted.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to continue working on this PR and have it ready (or perhaps even merge it) in case the problem happens again. Unless they've decided not to continue with the change, but I couldn't find any mention of that in https://github.com/orgs/community/discussions/147297.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe remove just the jwt parameter and leave the others?

should we work on this approach? as we can see both links with and without u token gives the same result:
https://avatars.githubusercontent.com/u/53535748?u=d1e55d7661d724bf2281c1bfd33cb8f99fe2465f&v=4

https://avatars.githubusercontent.com/u/53535748?v=4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to remove the JWT parameter and retain the others.

bio: profile.bio,
twitter_username: profile.twitter_username,
github_username: profile.login,
Expand Down