feat(branch): prevent manual creation of globals

This commit is contained in:
izzy lyseggen
2021-06-04 11:54:26 +01:00
parent d286258ae2
commit 04cefea84d
@@ -44,6 +44,9 @@ export default {
name: null,
nameRules: [
(v) => !!v || 'Branches need a name too!',
(v) =>
(v && !v.startsWith('globals')) ||
'Globals is a reserved branch name. Please choose a different name.',
(v) =>
(v && this.branchNames.findIndex((e) => e === v) === -1) ||
'A branch with this name already exists',