Skip to content

Commit 8333d07

Browse files
committed
chore: update repo + guard response
1 parent ece85bb commit 8333d07

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/_utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ export async function getContributors() {
120120
if (emails.has(commit.author.email) || commit.author.name === 'renovate[bot]') {
121121
continue
122122
}
123-
const { author } = await fetch(`https://api.github.com/repos/nuxt/fonts/commits/${commit.shortHash}`, {
123+
const { author } = await fetch(`https://api.github.com/repos/nuxt/telemetry/commits/${commit.shortHash}`, {
124124
headers: {
125-
'User-Agent': 'nuxt/fonts',
125+
'User-Agent': 'nuxt/telemetry',
126126
'Accept': 'application/vnd.github.v3+json',
127127
'Authorization': `token ${process.env.GITHUB_TOKEN}`,
128128
},
129129
}).then(r => r.json() as Promise<{ author: { login: string, email: string } }>)
130-
if (!contributors.some(c => c.username === author.login)) {
130+
if (author?.login && !contributors.some(c => c.username === author.login)) {
131131
contributors.push({ name: commit.author.name, username: author.login })
132132
}
133133
emails.add(author.email)

0 commit comments

Comments
 (0)