Skip to content

Commit

Permalink
feat: support for version constraint prefixes
Browse files Browse the repository at this point in the history
Add support for version constraint prefixes
  • Loading branch information
roborourke committed Oct 22, 2021
1 parent 25730f0 commit 23d28ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions action/lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export default function ({ title, labels = [], config = [], dependencies = {} })
return process.exit(0) // soft exit
}

// extract version from the title
const from = title.match(new RegExp('from v?' + regex.semver.source))?.groups
const to = title.match(new RegExp('to v?' + regex.semver.source))?.groups
// extract version from the title, allowing for constraints (~,^,>=) and v prefix
const from = title.match(new RegExp('from \\D*' + regex.semver.source))?.groups
const to = title.match(new RegExp('to \\D*' + regex.semver.source))?.groups

if (!to) {
core.warning('failed to parse title: no recognizable versions')
Expand Down

0 comments on commit 23d28ea

Please sign in to comment.