Commit 74152ac3b3b for woocommerce
commit 74152ac3b3b95542e4477015d0006a4fbef4dfe5
Author: Jorge A. Torres <jorge.torres@automattic.com>
Date: Tue Dec 1 11:57:58 2026 -0500
Fix release db-updates check misreading comments as callbacks (#71661)
diff --git a/.github/workflows/scripts/release-check-db-updates.js b/.github/workflows/scripts/release-check-db-updates.js
index c16d314d4d9..deda059dd61 100644
--- a/.github/workflows/scripts/release-check-db-updates.js
+++ b/.github/workflows/scripts/release-check-db-updates.js
@@ -70,9 +70,14 @@ const readDbUpdatesFromString = ( fileContent ) => {
const dbUpdates = new Map();
for ( const m of versionMatch ) {
+ // Strip comments first so a comma inside one (or the comment text itself) isn't mistaken for a callback.
+ const callbacksWithoutComments = m.groups.callbacks
+ .replace( /\/\/.*$/gm, '' )
+ .replace( /\/\*[\s\S]*?\*\//g, '' );
+
dbUpdates.set(
m.groups.version,
- m.groups.callbacks
+ callbacksWithoutComments
.split( ',' )
.map( c => c.replace( /['"]/g, '' ) )
.map( c => c.trim() )