From 00568a0a51bf6cbc1150bdf596c6fa58f711555b Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Mon, 12 Oct 2026 23:35:05 +1100 Subject: [PATCH 1/3] style(ci): quote registry request headers consistently --- scripts/check-release-channel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-release-channel.ts b/scripts/check-release-channel.ts index b222882b..1a9e70a3 100644 --- a/scripts/check-release-channel.ts +++ b/scripts/check-release-channel.ts @@ -10,7 +10,7 @@ if (!distTag || !output) const names = ['@nuxt/scripts', '@nuxt/scripts-cli', '@nuxt/scripts-devtools'] const currentVersions = await Promise.all(names.map(async (name) => { const response = await fetch(`https://registry.npmjs.org/${encodeURIComponent(name)}`, { - headers: { accept: 'application/vnd.npm.install-v1+json', 'cache-control': 'no-cache' }, + headers: { 'accept': 'application/vnd.npm.install-v1+json', 'cache-control': 'no-cache' }, signal: AbortSignal.timeout(30000), }) if (!response.ok) From a1a7e8910f75166f2b556d7365ec720564ea2726 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Mon, 12 Oct 2026 23:39:29 +1100 Subject: [PATCH 2/3] fix(ci): skip release planning for historical CI commits --- .github/workflows/release.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ce59041..d980af96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,14 @@ jobs: - name: Plan release id: plan - run: node scripts/prepare-release.ts + run: | + # CI started before this workflow existed can finish after its merge. + if [ "$GITHUB_EVENT_NAME" = 'workflow_run' ] && [ ! -f scripts/prepare-release.ts ]; then + echo 'Skip CI for a commit that predates release automation.' + echo 'release=false' >> "$GITHUB_OUTPUT" + else + node scripts/prepare-release.ts + fi release: needs: prepare From 478c4b2a9ea5d924343107bd77db7c23b3d71fcc Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Mon, 12 Oct 2026 23:44:27 +1100 Subject: [PATCH 3/3] fix(ci): skip size comments for closed or updated PRs --- .github/workflows/package-size-comment.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/package-size-comment.yml b/.github/workflows/package-size-comment.yml index c03a956b..80b84fd4 100644 --- a/.github/workflows/package-size-comment.yml +++ b/.github/workflows/package-size-comment.yml @@ -70,6 +70,11 @@ jobs: && pullRequest.base.repo.full_name === expectedBaseRepository, ) + if (matches.length === 0) { + core.info('The pull request closed or its head changed. Skipping the size comment.') + return + } + if (matches.length !== 1) { core.setFailed(`Expected one open pull request for ${run.head_sha}, found ${matches.length}`) return @@ -78,6 +83,7 @@ jobs: core.setOutput('number', matches[0].number) - name: Download package size report + if: steps.pull-request.outputs.number != '' uses: actions/download-artifact@v8 with: name: package-size-report @@ -88,6 +94,7 @@ jobs: # The artifact comes from a workflow run that may be a fork pull request. # Treat it as untrusted input and check it before it becomes a comment. - name: Validate package size report + if: steps.pull-request.outputs.number != '' env: COMMENT_PATH: ${{ runner.temp }}/package-size-comment.md EXPECTED_HEAD_SHA: ${{ github.event.workflow_run.head_sha }} @@ -140,6 +147,7 @@ jobs: sed 's/@/@/g' "$report" > "$COMMENT_PATH" - name: Post comment on pull request + if: steps.pull-request.outputs.number != '' uses: actions/github-script@v9 env: COMMENT_PATH: ${{ runner.temp }}/package-size-comment.md