diff --git a/plugins/filters/extractDependabotVersionBump/index.js b/plugins/filters/extractDependabotVersionBump/index.js index c3db2ee73..1556bfeaf 100644 --- a/plugins/filters/extractDependabotVersionBump/index.js +++ b/plugins/filters/extractDependabotVersionBump/index.js @@ -13,8 +13,14 @@ module.exports = (desc) => { if (desc && desc !== '""' && desc !== "''" ) { // Match both "Bumps" and "Updates" patterns with version numbers // The regex captures version numbers that follow "from" and "to" keywords + let parsedDesc = desc; + try { + parsedDesc = JSON.parse(desc); + } catch (e) { + // If parsing fails, use the description as is + } const regex = /(Bumps|Updates).*?from ([\d\.]+[A-Za-zαß]*) to ([\d\.]+[A-Za-zαß]*)/; - const matches = regex.exec(desc); + const matches = regex.exec(parsedDesc); if (matches && matches.length == 4) { var [_, action, from, to] = matches; // Remove trailing dot on the "to" version if present