Skip to content

Commit 599c4d2

Browse files
committed
chore: use fetch api
1 parent 29d45b3 commit 599c4d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/update-changelog.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,13 @@ export async function getContributors() {
221221
if(emails.has(commit.author.email)||commit.author.name==='renovate[bot]'){
222222
continue
223223
}
224-
const{ author }=await$fetch<{author: {login: string,email: string}}>(`https://api.github.com/repos/${repo}/commits/${commit.shortHash}`,{
224+
const{ author }=awaitfetch(`https://api.github.com/repos/${repo}/commits/${commit.shortHash}`,{
225225
headers: {
226226
'User-Agent': `${repo} github action automation`,
227227
'Accept': 'application/vnd.github.v3+json',
228228
'Authorization': `token ${process.env.GITHUB_TOKEN}`,
229229
},
230-
})
230+
}).then(r=>r.json()asPromise<{author: {login: string,email: string}|null}>)
231231
if(!author){
232232
continue
233233
}

0 commit comments

Comments
 (0)