diff options
| author | Aaron Crickenberger <spiffxp@gmail.com> | 2021-03-08 00:50:46 -0500 |
|---|---|---|
| committer | Aaron Crickenberger <spiffxp@google.com> | 2021-03-09 14:12:03 -0500 |
| commit | 34684158e963b01c8aca5728d0e33549fc926586 (patch) | |
| tree | 879ad79a3927a629be677af13eae843d608d62fd /generator/app.go | |
| parent | 7a3a9e4e5705517f272c613b6b5fa22f34dbd43e (diff) | |
generator: allow github and raw urls in sigs.yaml
Diffstat (limited to 'generator/app.go')
| -rw-r--r-- | generator/app.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/generator/app.go b/generator/app.go index a73dc7d2..c9e3f85b 100644 --- a/generator/app.go +++ b/generator/app.go @@ -250,7 +250,8 @@ func (c *Context) Sort() { func (c *Context) Validate() []error { errors := []error{} people := make(map[string]Person) - rawGitHubURL := regexp.MustCompile(regexRawGitHubURL) + reRawGitHubURL := regexp.MustCompile(regexRawGitHubURL) + reGitHubURL := regexp.MustCompile(regexGitHubURL) for prefix, groups := range c.PrefixToGroupMap() { for _, group := range groups { expectedDir := group.DirName(prefix) @@ -309,7 +310,7 @@ func (c *Context) Validate() []error { errors = append(errors, fmt.Errorf("%s/%s: subproject has no owners", group.Dir, subproject.Name)) } for _, ownerURL := range subproject.Owners { - if !rawGitHubURL.MatchString(ownerURL) { + if !reRawGitHubURL.MatchString(ownerURL) && !reGitHubURL.MatchString(ownerURL) { errors = append(errors, fmt.Errorf("%s/%s: subproject owners should match regexp %s, found: %s", group.Dir, subproject.Name, regexRawGitHubURL, ownerURL)) } } |
