Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion plugins/filters/extractDependabotVersionBump/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down