Skip to content

Commit

Permalink
ci: use changelogen utility to get current branch
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Sep 4, 2023
1 parent d28189e commit 7431e22
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/update-changelog.ts
@@ -1,15 +1,13 @@
import { execSync } from 'node:child_process'
import { $fetch } from 'ofetch'
import { inc } from 'semver'
import { generateMarkDown, loadChangelogConfig } from 'changelogen'
import { generateMarkDown, getCurrentGitBranch, loadChangelogConfig } from 'changelogen'
import { determineBumpType, getLatestCommits, loadWorkspace } from './_utils'

const releaseBranch = process.env.GITHUB_REF_NAME || 'main'

async function main () {
const releaseBranch = await getCurrentGitBranch()
const workspace = await loadWorkspace(process.cwd())
const config = await loadChangelogConfig(process.cwd(), {
})
const config = await loadChangelogConfig(process.cwd(), {})

const commits = await getLatestCommits().then(commits => commits.filter(
c => config.types[c.type] && !(c.type === 'chore' && c.scope === 'deps' && !c.isBreaking)
Expand Down

0 comments on commit 7431e22

Please sign in to comment.