Skip to content

Commit 5018ed2

Browse files
committed
chore: handle missing commit details
1 parent 5fb4b8f commit 5018ed2

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
@@ -144,7 +144,7 @@ export async function getContributors () {
144144
'Accept': 'application/vnd.github.v3+json',
145145
'Authorization': `token ${process.env.GITHUB_TOKEN}`,
146146
},
147-
})
147+
}).catch(() => ({ author: null }))
148148
if (!author) { continue }
149149
if (!contributors.some(c => c.username === author.login)) {
150150
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,12 +3,12 @@ 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, getLatestReleasedTag, getLatestTag, getPreviousReleasedCommits, loadWorkspace } from './_utils'
6+
import { determineBumpType, getContributors, getLatestCommits, getLatestReleasedTag, getLatestTag, getPreviousReleasedCommits, loadWorkspace } from './_utils.ts'
77

88
const handleSeparateBranch = true
99

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

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)