mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-23 23:29:12 -04:00
Allow 3-character branch names (Closes #1803)
This commit is contained in:
1 parent
42e198bf75
commit
c9f80816a1
1 file changed
+5
-2
@@ -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 '';
|
||||
|
||||
Reference in new issue
Block a user