pr: Comment on Portfile regex

This commit is contained in:
Zero King
2019-01-06 02:19:09 +00:00
parent f54caea853
commit 98fa1eff64
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ func GetChangedPortList() ([]string, error) {
return nil, err
}
ports := make([]string, 0, 1)
gitRegexp := regexp.MustCompile(`[AM]\t[^\._/][^/]*/([^/]+)/Portfile`)
gitRegexp := regexp.MustCompile(`[AM]\t[^\._/][^/]*/([^/]+)/Portfile`) // Ignore hidden and _* top directories
stdoutScanner := bufio.NewScanner(stdout)
for stdoutScanner.Scan() {
line := stdoutScanner.Text()
+1 -1
View File
@@ -33,7 +33,7 @@ func (client *githubClient) ListChangedPortsAndFiles(owner, repo string, number
opt.Page = resp.NextPage
}
portfileRegexp := regexp.MustCompile(`[^\._/][^/]*/([^/]+)/Portfile`)
portfileRegexp := regexp.MustCompile(`[^\._/][^/]*/([^/]+)/Portfile`) // Ignore hidden and _* top directories
for _, file := range allFiles {
if match := portfileRegexp.FindStringSubmatch(*file.Filename); match != nil {
ports = append(ports, match[1])