File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -492,7 +492,7 @@ var migrations = []Migration{
492
492
// v256 -> v257
493
493
NewMigration ("Add is_internal column to package" , v1_20 .AddIsInternalColumnToPackage ),
494
494
// v257 -> v258
495
- NewMigration ("Add varibale table" , v1_20 .CreateVariableTable ),
495
+ NewMigration ("Add variable table" , v1_20 .CreateVariableTable ),
496
496
}
497
497
498
498
// GetCurrentDBVersion returns the current db version
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ type ErrVariableInvalidValue struct {
43
43
44
44
func (err ErrVariableInvalidValue ) Error () string {
45
45
if err .Name != nil {
46
- return fmt .Sprintf ("varibale name %s is invalid" , * err .Name )
46
+ return fmt .Sprintf ("variable name %s is invalid" , * err .Name )
47
47
}
48
48
if err .Data != nil {
49
49
return fmt .Sprintf ("variable data %s is invalid" , * err .Data )
@@ -54,7 +54,7 @@ func (err ErrVariableInvalidValue) Error() string {
54
54
// some regular expression of `variables`
55
55
// reference to: https://docs.github.com/en/actions/learn-github-actions/variables#naming-conventions-for-configuration-variables
56
56
var (
57
- varibaleNameReg = regexp .MustCompile ("(?i)^[A-Z_][A-Z0-9_]*$" )
57
+ variableNameReg = regexp .MustCompile ("(?i)^[A-Z_][A-Z0-9_]*$" )
58
58
variableForbiddenPrefixReg = regexp .MustCompile ("(?i)^GIT(EA|HUB)_" )
59
59
)
60
60
@@ -66,7 +66,7 @@ func (v *Variable) Validate() error {
66
66
return ErrVariableInvalidValue {Name : & v .Name }
67
67
case len (v .Data ) == 0 :
68
68
return ErrVariableInvalidValue {Data : & v .Data }
69
- case ! varibaleNameReg .MatchString (v .Name ) || variableForbiddenPrefixReg .MatchString (v .Name ):
69
+ case ! variableNameReg .MatchString (v .Name ) || variableForbiddenPrefixReg .MatchString (v .Name ):
70
70
return ErrVariableInvalidValue {Name : & v .Name }
71
71
default :
72
72
return nil
You can’t perform that action at this time.
0 commit comments