Skip to content

Commit 02fe0d9

Browse files
committed
chore: Update backport script to not parse numbers
1 parent 935d235 commit 02fe0d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/backport.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ const yargs = require(`yargs`)
44
const { Octokit } = require(`@octokit/rest`)
55
const childProcess = require(`child_process`)
66

7+
yargs.parserConfiguration({
8+
"parse-numbers": false,
9+
})
10+
711
if (!process.env.GITHUB_ACCESS_TOKEN) {
812
throw new Error(`GITHUB_ACCESS_TOKEN env var not set`)
913
}
@@ -22,7 +26,7 @@ const argv = yargs
2226
.positional(`pr`, { type: `number` })
2327
)
2428
.check(argv => {
25-
if (!/^3\.\d+$/.test(argv.release)) {
29+
if (!/^[1-9][0-9]*\.\d+$/.test(argv.release)) {
2630
throw new Error(`"${argv.release}" is not a release version`)
2731
}
2832

0 commit comments

Comments
 (0)