File tree 3 files changed +12
-6
lines changed
3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export function isExecutionSuccessful(exitCode: number): boolean {
81
81
}
82
82
83
83
/**
84
- * Finds the wanted argument value in the given args, if there is one.
84
+ * Finds the wanted argument value in the given args if there is one.
85
85
* @param argShort the short argument name.
86
86
* @param argLong the long argument name.
87
87
* @param args command arguments.
@@ -256,9 +256,11 @@ export function getQodanaSha256MismatchMessage(
256
256
* @param branchName the branch name to sanitize.
257
257
*/
258
258
export function validateBranchName ( branchName : string ) : string {
259
- const validBranchNameRegex = / ^ [ a - z A - Z 0 - 9 / \- _ ] + $ / ;
259
+ const validBranchNameRegex = / ^ [ a - z A - Z 0 - 9 / \- _ ] + $ /
260
260
if ( ! validBranchNameRegex . test ( branchName ) ) {
261
- throw new Error ( "Invalid branch name: not allowed characters are used:" + branchName ) ;
261
+ throw new Error (
262
+ `Invalid branch name: not allowed characters are used: ${ branchName } `
263
+ )
262
264
}
263
- return branchName ;
265
+ return branchName
264
266
}
Original file line number Diff line number Diff line change @@ -24436,7 +24436,9 @@ function getQodanaSha256MismatchMessage(expected, actual) {
24436
24436
function validateBranchName(branchName) {
24437
24437
const validBranchNameRegex = /^[a-zA-Z0-9/\-_]+$/;
24438
24438
if (!validBranchNameRegex.test(branchName)) {
24439
- throw new Error("Invalid branch name: not allowed characters are used:" + branchName);
24439
+ throw new Error(
24440
+ `Invalid branch name: not allowed characters are used: ${branchName}`
24441
+ );
24440
24442
}
24441
24443
return branchName;
24442
24444
}
Original file line number Diff line number Diff line change @@ -197,7 +197,9 @@ function getQodanaSha256MismatchMessage(expected, actual) {
197
197
function validateBranchName ( branchName ) {
198
198
const validBranchNameRegex = / ^ [ a - z A - Z 0 - 9 / \- _ ] + $ / ;
199
199
if ( ! validBranchNameRegex . test ( branchName ) ) {
200
- throw new Error ( "Invalid branch name: not allowed characters are used:" + branchName ) ;
200
+ throw new Error (
201
+ `Invalid branch name: not allowed characters are used: ${ branchName } `
202
+ ) ;
201
203
}
202
204
return branchName ;
203
205
}
You can’t perform that action at this time.
0 commit comments