Merge branch 'main' into main

This commit is contained in:
Daniel Roe 2023-09-04 09:20:42 +01:00 committed by GitHub
commit 3d8d5ec886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -4,6 +4,7 @@ on:
push:
branches:
- main
- 2.x
permissions:
pull-requests: write

View File

@ -26,7 +26,10 @@ export default defineNuxtPlugin({
head.hooks.hook('dom:beforeRender', (context) => { context.shouldRender = !pauseDOMUpdates })
nuxtApp.hooks.hook('page:start', () => { pauseDOMUpdates = true })
// wait for new page before unpausing dom updates (triggered after suspense resolved)
nuxtApp.hooks.hook('page:finish', syncHead)
nuxtApp.hooks.hook('page:finish', () => {
// app:suspense:resolve hook will unpause the DOM
if (!nuxtApp.isHydrating) { syncHead() }
})
// unpause on error
nuxtApp.hooks.hook('app:error', syncHead)
// unpause the DOM once the mount suspense is resolved

View File

@ -4,6 +4,8 @@ import { inc } from 'semver'
import { generateMarkDown, loadChangelogConfig } from 'changelogen'
import { determineBumpType, getLatestCommits, loadWorkspace } from './_utils'
const releaseBranch = process.env.BRANCH || 'main'
async function main () {
const workspace = await loadWorkspace(process.cwd())
const config = await loadChangelogConfig(process.cwd(), {
@ -39,7 +41,7 @@ async function main () {
const releaseNotes = [
currentPR?.body.replace(/## 👉 Changelog[\s\S]*$/, '') || `> ${newVersion} is the next ${bumpType} release.\n>\n> **Timetable**: to be announced.`,
'## 👉 Changelog',
changelog.replace(/^## v.*?\n/, '').replace('...main', `...v${newVersion}`)
changelog.replace(/^## v.*?\n/, '').replace(`...${releaseBranch}`, `...v${newVersion}`)
].join('\n')
// Create a PR with release notes if none exists
@ -52,7 +54,7 @@ async function main () {
body: {
title: `v${newVersion}`,
head: `v${newVersion}`,
base: 'main',
base: releaseBranch,
body: releaseNotes,
draft: true
}