Commit 03803f678a for woocommerce

commit 03803f678a8f7fd2040a361239a153403ce5e108
Author: Jorge A. Torres <jorge.torres@automattic.com>
Date:   Fri Dec 12 09:24:09 2025 +0000

    Improve pre-build release checks (#62351)

diff --git a/.github/workflows/release-build-zip-file.yml b/.github/workflows/release-build-zip-file.yml
index 0da34976e2..1608291875 100644
--- a/.github/workflows/release-build-zip-file.yml
+++ b/.github/workflows/release-build-zip-file.yml
@@ -92,13 +92,6 @@ jobs:
           GH_TOKEN: ${{ github.token }}
           GH_REPO: ${{ github.repository }}
         run: |
-            # No PRs by automated tools should remain open.
-            count=$( gh pr list --search "is:open label:Release" --limit 1 --json number | jq length )
-            if (( count > 0 )); then
-                echo "::error::Pre-build verification: there are release PRs still open."
-                exit 1
-            fi
-
             # Branch name must be 'release/*'.
             branch_name="${BRANCH#refs/heads/}"
             if  [[ $branch_name != release/* ]] ; then
diff --git a/.github/workflows/scripts/release-check-db-updates.js b/.github/workflows/scripts/release-check-db-updates.js
index b7c8296250..4762943226 100644
--- a/.github/workflows/scripts/release-check-db-updates.js
+++ b/.github/workflows/scripts/release-check-db-updates.js
@@ -3,7 +3,7 @@
  *
  * @param {string} version
  * @param {{ github: Octokit, context: { repo: { owner: string, repo: string } } }} options
- * @returns {Promise<string>} The previous version.
+ * @returns {Promise<string> | null} The previous version.
  */
 const findPreviousVersion = async ( version, { github, context } ) => {
   if ( version.endsWith( '-dev' ) || version.endsWith( '-beta.1' ) ) {
@@ -40,7 +40,7 @@ const findPreviousVersion = async ( version, { github, context } ) => {
   );

   if ( 0 === allTags.length) {
-    throw new Error( `Cannot determine previous version for '${ version }'.` );
+    return null;
   }

   // Insert current version in array when necessary.
@@ -167,6 +167,11 @@ const run = async ( currentRef, { github, context } ) => {

   // Previous version.
   const previousRef = await findPreviousVersion( version, { github, context } );
+  if ( ! previousRef ) {
+    console.log( `No previous version for '${ version }'. Skipping db updates check.` );
+    return;
+  }
+
   const previousFile = await readFileFromRef( previousRef, 'plugins/woocommerce/includes/class-wc-install.php', { github, context } );
   const previousDbUpdates = readDbUpdatesFromString( previousFile );