From aa7ef7c81fc7c8fda1e1ae893bc55032c261c25f Mon Sep 17 00:00:00 2001 From: Twisha Bansal <58483338+twishabansal@users.noreply.github.com> Date: Fri, 31 Oct 2025 12:20:46 +0530 Subject: [PATCH 01/12] ci: fix workflow issues --- .github/workflows/mirror-changelog.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mirror-changelog.yml b/.github/workflows/mirror-changelog.yml index 76c347a..dafd8b8 100644 --- a/.github/workflows/mirror-changelog.yml +++ b/.github/workflows/mirror-changelog.yml @@ -82,7 +82,10 @@ jobs: // Match and extract changelog item const itemMatch = trimmedLine.match(/^[*-]\s(.*)$/); if (itemMatch) { - const originalContent = itemMatch[1]; + let originalContent = itemMatch[1]; + + // remove zero-width space character + originalContent = originalContent.replace(/\u200B/g, ''); const lineAsLowerCase = originalContent.toLowerCase(); const hasPrefix = prefixesToFilter.some(prefix => lineAsLowerCase.includes(prefix)); From 5d7d6733771b56e01ef11da86af19e52e21ead7b Mon Sep 17 00:00:00 2001 From: Twisha Bansal Date: Fri, 31 Oct 2025 11:26:46 +0530 Subject: [PATCH 02/12] ci: add release-please label --- .github/labels.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/labels.yaml b/.github/labels.yaml index 2096da1..ea8ffce 100644 --- a/.github/labels.yaml +++ b/.github/labels.yaml @@ -79,4 +79,8 @@ - name: 'status: waiting for response' color: 8befd7 - description: 'Status: reviewer is awaiting feedback or responses from the author before proceeding.' \ No newline at end of file + description: 'Status: reviewer is awaiting feedback or responses from the author before proceeding.' + +- name: 'release-please:force-run' + color: bdca82 + description: To run release-please \ No newline at end of file From f69a2d19eb75e66133534d0d240a8544064ca5b6 Mon Sep 17 00:00:00 2001 From: Twisha Bansal Date: Fri, 31 Oct 2025 11:31:54 +0530 Subject: [PATCH 03/12] fix description --- .github/labels.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/labels.yaml b/.github/labels.yaml index ea8ffce..5974f23 100644 --- a/.github/labels.yaml +++ b/.github/labels.yaml @@ -83,4 +83,4 @@ - name: 'release-please:force-run' color: bdca82 - description: To run release-please \ No newline at end of file + description: Manually trigger the release please workflow on a PR. \ No newline at end of file From 27f6f173c7edd92f790e8baa8a08efa8382863cb Mon Sep 17 00:00:00 2001 From: Twisha Bansal Date: Fri, 31 Oct 2025 12:37:31 +0530 Subject: [PATCH 04/12] update issue links --- .github/workflows/mirror-changelog.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/mirror-changelog.yml b/.github/workflows/mirror-changelog.yml index dafd8b8..206e0f9 100644 --- a/.github/workflows/mirror-changelog.yml +++ b/.github/workflows/mirror-changelog.yml @@ -86,6 +86,9 @@ jobs: // remove zero-width space character originalContent = originalContent.replace(/\u200B/g, ''); + + // Change issue links from #1234 to genai-toolbox#1234 + originalContent = originalContent.replace(/\[#(\d+)\](\([^)]+\))/g, '[genai-toolbox#$1]$2'); const lineAsLowerCase = originalContent.toLowerCase(); const hasPrefix = prefixesToFilter.some(prefix => lineAsLowerCase.includes(prefix)); From 475a1828044b0ba240ef6292ac7eef442d8bf4dc Mon Sep 17 00:00:00 2001 From: Twisha Bansal Date: Fri, 31 Oct 2025 12:38:30 +0530 Subject: [PATCH 05/12] remove unwanted files --- .github/labels.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/labels.yaml b/.github/labels.yaml index 5974f23..2096da1 100644 --- a/.github/labels.yaml +++ b/.github/labels.yaml @@ -79,8 +79,4 @@ - name: 'status: waiting for response' color: 8befd7 - description: 'Status: reviewer is awaiting feedback or responses from the author before proceeding.' - -- name: 'release-please:force-run' - color: bdca82 - description: Manually trigger the release please workflow on a PR. \ No newline at end of file + description: 'Status: reviewer is awaiting feedback or responses from the author before proceeding.' \ No newline at end of file From b8f7d735797e3b729b3d809773ccda01336de899 Mon Sep 17 00:00:00 2001 From: Twisha Bansal <58483338+twishabansal@users.noreply.github.com> Date: Fri, 31 Oct 2025 12:56:33 +0530 Subject: [PATCH 06/12] change for testing purposes --- .github/workflows/mirror-changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mirror-changelog.yml b/.github/workflows/mirror-changelog.yml index 206e0f9..5446c84 100644 --- a/.github/workflows/mirror-changelog.yml +++ b/.github/workflows/mirror-changelog.yml @@ -20,7 +20,7 @@ on: jobs: add-release-notes: - if: github.actor == 'renovate-bot' && startsWith(github.head_ref, 'renovate/googleapis-genai-toolbox') + if: github.actor == 'twishabansal' runs-on: ubuntu-latest permissions: pull-requests: write From 6f253957d84436a9b9f37d2ca9fbdefca2402c1c Mon Sep 17 00:00:00 2001 From: Twisha Bansal <58483338+twishabansal@users.noreply.github.com> Date: Fri, 31 Oct 2025 12:58:31 +0530 Subject: [PATCH 07/12] Update mirror-changelog.yml --- .github/workflows/mirror-changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mirror-changelog.yml b/.github/workflows/mirror-changelog.yml index 5446c84..78071c6 100644 --- a/.github/workflows/mirror-changelog.yml +++ b/.github/workflows/mirror-changelog.yml @@ -20,7 +20,7 @@ on: jobs: add-release-notes: - if: github.actor == 'twishabansal' + if: github.actor == 'twishabansal' && startsWith(github.head_ref, 'test-workflow') runs-on: ubuntu-latest permissions: pull-requests: write From 8b17efe84ea45b53a1f337af615b7bb137d5076c Mon Sep 17 00:00:00 2001 From: Twisha Bansal Date: Fri, 31 Oct 2025 16:35:21 +0530 Subject: [PATCH 08/12] fix script --- .github/workflows/mirror-changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mirror-changelog.yml b/.github/workflows/mirror-changelog.yml index 78071c6..7e4a3f8 100644 --- a/.github/workflows/mirror-changelog.yml +++ b/.github/workflows/mirror-changelog.yml @@ -85,7 +85,7 @@ jobs: let originalContent = itemMatch[1]; // remove zero-width space character - originalContent = originalContent.replace(/\u200B/g, ''); + originalContent = originalContent.replace(/​/g, ''); // Change issue links from #1234 to genai-toolbox#1234 originalContent = originalContent.replace(/\[#(\d+)\](\([^)]+\))/g, '[genai-toolbox#$1]$2'); From 64be3570cfa32e44aaa8fbb13b509404b82ec458 Mon Sep 17 00:00:00 2001 From: Twisha Bansal Date: Fri, 31 Oct 2025 16:56:14 +0530 Subject: [PATCH 09/12] fix workflow --- .github/workflows/mirror-changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mirror-changelog.yml b/.github/workflows/mirror-changelog.yml index 7e4a3f8..c868517 100644 --- a/.github/workflows/mirror-changelog.yml +++ b/.github/workflows/mirror-changelog.yml @@ -88,7 +88,7 @@ jobs: originalContent = originalContent.replace(/​/g, ''); // Change issue links from #1234 to genai-toolbox#1234 - originalContent = originalContent.replace(/\[#(\d+)\](\([^)]+\))/g, '[genai-toolbox#$1]$2'); + originalContent = originalContent.replace(/\[#(\d+)\](\([^)]+\))/g, '[genai-toolbox#$1]$2'); const lineAsLowerCase = originalContent.toLowerCase(); const hasPrefix = prefixesToFilter.some(prefix => lineAsLowerCase.includes(prefix)); From 39d2be838897fd5c958ff4987426f4d69b58c967 Mon Sep 17 00:00:00 2001 From: Twisha Bansal <58483338+twishabansal@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:03:19 +0530 Subject: [PATCH 10/12] Update mirror-changelog.yml --- .github/workflows/mirror-changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mirror-changelog.yml b/.github/workflows/mirror-changelog.yml index c868517..c7c6f2a 100644 --- a/.github/workflows/mirror-changelog.yml +++ b/.github/workflows/mirror-changelog.yml @@ -88,7 +88,7 @@ jobs: originalContent = originalContent.replace(/​/g, ''); // Change issue links from #1234 to genai-toolbox#1234 - originalContent = originalContent.replace(/\[#(\d+)\](\([^)]+\))/g, '[genai-toolbox#$1]$2'); + originalContent = originalContent.replace(/\[#(\d+)\](\([^)]+\))/g, '[genai-toolbox#\u200B$1]$2'); const lineAsLowerCase = originalContent.toLowerCase(); const hasPrefix = prefixesToFilter.some(prefix => lineAsLowerCase.includes(prefix)); From 47fa978bfda0ac87be99c72924e4f6a3750c42ec Mon Sep 17 00:00:00 2001 From: Twisha Bansal <58483338+twishabansal@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:07:44 +0530 Subject: [PATCH 11/12] Update mirror-changelog.yml --- .github/workflows/mirror-changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mirror-changelog.yml b/.github/workflows/mirror-changelog.yml index c7c6f2a..6fce800 100644 --- a/.github/workflows/mirror-changelog.yml +++ b/.github/workflows/mirror-changelog.yml @@ -20,7 +20,7 @@ on: jobs: add-release-notes: - if: github.actor == 'twishabansal' && startsWith(github.head_ref, 'test-workflow') + if: github.actor == 'renovate-bot' && startsWith(github.head_ref, 'renovate/googleapis-genai-toolbox') runs-on: ubuntu-latest permissions: pull-requests: write From 7e2266487ab1a0da357807555b16b33494d44fe9 Mon Sep 17 00:00:00 2001 From: Twisha Bansal <58483338+twishabansal@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:16:55 +0530 Subject: [PATCH 12/12] Update mirror-changelog.yml --- .github/workflows/mirror-changelog.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mirror-changelog.yml b/.github/workflows/mirror-changelog.yml index 6fce800..925064d 100644 --- a/.github/workflows/mirror-changelog.yml +++ b/.github/workflows/mirror-changelog.yml @@ -84,13 +84,24 @@ jobs: if (itemMatch) { let originalContent = itemMatch[1]; - // remove zero-width space character + // This is a two-step process to prevent `release-please` from + // creating mangled, doubly-nested links for PRs. + + // STEP 1: CLEAN THE INPUT. + // The source changelog contains a zero-width space as an HTML entity (`​`). + // This breaks the regex in the next step, so we must remove it first. + // E.g., "[#​1770](...)" becomes "[#1770](...)" originalContent = originalContent.replace(/​/g, ''); - // Change issue links from #1234 to genai-toolbox#1234 + // STEP 2: PROTECT THE OUTPUT. + // `release-please` aggressively tries to auto-link any text that looks like `#1234`. + // To prevent this, we insert an invisible Unicode zero-width space (`\u200B`) + // between the '#' and the number in the link text. This breaks the parser's + // pattern matching without changing the visual appearance of the link. + // E.g., "[#1770](...)" becomes "[genai-toolbox#​1770](...)" originalContent = originalContent.replace(/\[#(\d+)\](\([^)]+\))/g, '[genai-toolbox#\u200B$1]$2'); + const lineAsLowerCase = originalContent.toLowerCase(); - const hasPrefix = prefixesToFilter.some(prefix => lineAsLowerCase.includes(prefix)); // Check if the line includes ANY of the required keywords