Skip to content

Commit c24da4c

Browse files
committed
Fix user tile bug
* For some reason, some user objects in the graph API are missing a user URL. * Users without a URL don't get a link to their GitHub profile. * Fix is to explicitly ensure that we don't overwrite a good user URL with an empty one.
1 parent 97d8979 commit c24da4c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/get_contributors.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ module.exports = async function (filepath) {
9292
return Object.values(
9393
[...authors, ...reviewers].reduce((accumulator, user) => {
9494
// Dedupe users
95-
accumulator[user.name] = user
95+
const newUser = accumulator[user.name] || user
96+
newUser.url = newUser.url || user.url
97+
accumulator[user.name] = newUser
98+
9699
return accumulator
97100
}, {})
98101
)

0 commit comments

Comments
 (0)