From c9f80816a1258f41aed10f866aeec024cee8f2f5 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 26 Nov 2019 13:40:54 -0500 Subject: [PATCH] Allow 3-character branch names (Closes #1803) --- packages/insomnia-app/app/sync/vcs/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/insomnia-app/app/sync/vcs/index.js b/packages/insomnia-app/app/sync/vcs/index.js index eeda89b1bf..c1ecdd846e 100644 --- a/packages/insomnia-app/app/sync/vcs/index.js +++ b/packages/insomnia-app/app/sync/vcs/index.js @@ -180,8 +180,11 @@ export default class VCS { } static validateBranchName(branchName: string): string { - if (!branchName.match(/^[a-zA-Z0-9][a-zA-Z0-9-_.]{3,}$/)) { - return 'Branch names can only contain letters, numbers, - and _'; + if (!branchName.match(/^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,}$/)) { + return ( + 'Branch names must be at least 3 characters long and can only contain ' + + 'letters, numbers, - and _' + ); } return '';