From 1a128068b438d60cf0b44f9c028be8bbc2dd46b0 Mon Sep 17 00:00:00 2001 From: Andrea Debernardi Date: Mon, 9 Nov 2026 15:39:52 +0000 Subject: [PATCH] fix: show version suggestion for fork pull requests --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 717cc50..f21f605 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -297,6 +297,16 @@ jobs: const prNumber = context.payload.pull_request.number; + // Fork PR tokens are read-only. Keep the suggestion visible in the + // job summary without attempting to write a PR comment. + if (context.payload.pull_request.head.repo.full_name !== context.payload.pull_request.base.repo.full_name) { + const message = classification === "none" + ? `No release needed for this PR (${type}).` + : `Current: ${baselineStr}\n\nSuggested next tag: v${computeNextVersion(baselineStr, classification, channel)}`; + await core.summary.addHeading("Version suggestion").addRaw(message).write(); + return; + } + // Find our most recent, not-yet-minimized comment on this PR. const { data: comments } = await github.rest.issues.listComments({ owner: context.repo.owner,