Skip to content

Commit 0af9876

Browse files
committed
chore: handle missing commit details
1 parent bf3ebb2 commit 0af9876

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

scripts/_utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export async function getContributors () {
126126
'Accept': 'application/vnd.github.v3+json',
127127
'Authorization': `token ${process.env.GITHUB_TOKEN}`,
128128
},
129-
})
129+
}).catch(() => ({ author: null }))
130130
if (!author) { continue }
131131
if (!contributors.some(c => c.username === author.login)) {
132132
contributors.push({ name: commit.author.name, username: author.login })

scripts/update-changelog.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { $fetch } from 'ofetch'
33
import { inc } from 'semver'
44
import { generateMarkDown, getCurrentGitBranch, loadChangelogConfig } from 'changelogen'
55
import { consola } from 'consola'
6-
import { determineBumpType, getContributors, getLatestCommits, loadWorkspace } from './_utils'
6+
import { determineBumpType, getContributors, getLatestCommits, loadWorkspace } from './_utils.ts'
77

88
async function main () {
9-
const releaseBranch = await getCurrentGitBranch()
9+
const releaseBranch = getCurrentGitBranch()
1010
const workspace = await loadWorkspace(process.cwd())
1111
const config = await loadChangelogConfig(process.cwd(), {})
1212

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"skipLibCheck": true,
77
"target": "es2022",
88
"allowJs": true,
9+
"allowImportingTsExtensions": true,
910
"resolveJsonModule": true,
1011
"moduleDetection": "force",
1112
"isolatedModules": true,

0 commit comments

Comments
 (0)