mirror of
https://github.com/macports/mpbot-github.git
synced 2026-07-13 03:18:39 -07:00
pr: Comment on Portfile regex
This commit is contained in:
+1
-1
@@ -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()
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user