Skip to content

Commit

Permalink
chore: update changelog script
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Aug 31, 2023
1 parent 08e73a2 commit 65d8151
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/changelog/generate-changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getFilePath = (p: string) => path.resolve(ROOT_DIR, p)
const FEAT_N_FIX_HEADER = `### 🚀 Features & Fixes`
const CONTRIB_HEADER = `### 🙌 Contributions`

const MAINTAINER_LOGINS = ['octref', 'orta']
const MAINTAINER_LOGINS = ['octref', 'orta', 'antfu']

const readQuery = (filename: string) => {
return fs.readFileSync(path.resolve(__dirname, `./${filename}`), 'utf-8')
Expand All @@ -29,11 +29,14 @@ const getGithubGraphql = async (query: string) => {
headers: {
'Content-Type': 'application/json',
'Content-Length': `${data.length}`,
Authorization: 'bearer ' + process.env.GITHUB_SECRET,
Authorization: 'bearer ' + (process.env.GITHUB_SECRET || process.env.GITHUB_TOKEN),
'User-Agent': 'Shiki'
}
})

if (200 < res.status && res.status >= 300)
throw new Error(`Failed to fetch: ${res.status} ${res.statusText}`)

return await res.json()
}

Expand Down

0 comments on commit 65d8151

Please sign in to comment.