From 02fe0d99cf0e6f5834a3d0728c9b8277d054fdd1 Mon Sep 17 00:00:00 2001 From: LekoArts Date: Fri, 16 Jul 2021 09:44:26 +0200 Subject: [PATCH] chore: Update backport script to not parse numbers --- scripts/backport.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/backport.js b/scripts/backport.js index 4528ac3a62b0e..fce6fb27e159e 100644 --- a/scripts/backport.js +++ b/scripts/backport.js @@ -4,6 +4,10 @@ const yargs = require(`yargs`) const { Octokit } = require(`@octokit/rest`) const childProcess = require(`child_process`) +yargs.parserConfiguration({ + "parse-numbers": false, +}) + if (!process.env.GITHUB_ACCESS_TOKEN) { throw new Error(`GITHUB_ACCESS_TOKEN env var not set`) } @@ -22,7 +26,7 @@ const argv = yargs .positional(`pr`, { type: `number` }) ) .check(argv => { - if (!/^3\.\d+$/.test(argv.release)) { + if (!/^[1-9][0-9]*\.\d+$/.test(argv.release)) { throw new Error(`"${argv.release}" is not a release version`) }