Skip to content

Commit 3468415

Browse files
committed
generator: allow github and raw urls in sigs.yaml
1 parent 7a3a9e4 commit 3468415

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

generator/app.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ func (c *Context) Sort() {
250250
func (c *Context) Validate() []error {
251251
errors := []error{}
252252
people := make(map[string]Person)
253-
rawGitHubURL := regexp.MustCompile(regexRawGitHubURL)
253+
reRawGitHubURL := regexp.MustCompile(regexRawGitHubURL)
254+
reGitHubURL := regexp.MustCompile(regexGitHubURL)
254255
for prefix, groups := range c.PrefixToGroupMap() {
255256
for _, group := range groups {
256257
expectedDir := group.DirName(prefix)
@@ -309,7 +310,7 @@ func (c *Context) Validate() []error {
309310
errors = append(errors, fmt.Errorf("%s/%s: subproject has no owners", group.Dir, subproject.Name))
310311
}
311312
for _, ownerURL := range subproject.Owners {
312-
if !rawGitHubURL.MatchString(ownerURL) {
313+
if !reRawGitHubURL.MatchString(ownerURL) && !reGitHubURL.MatchString(ownerURL) {
313314
errors = append(errors, fmt.Errorf("%s/%s: subproject owners should match regexp %s, found: %s", group.Dir, subproject.Name, regexRawGitHubURL, ownerURL))
314315
}
315316
}

0 commit comments

Comments
 (0)