From 98fa1eff643614051a52936e3bb9d2c982f4d146 Mon Sep 17 00:00:00 2001 From: Zero King Date: Sun, 6 Jan 2019 02:17:16 +0000 Subject: [PATCH] pr: Comment on Portfile regex --- ci/portlist.go | 2 +- pr/githubapi/pull_request.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/portlist.go b/ci/portlist.go index 2421fbb..58e7026 100644 --- a/ci/portlist.go +++ b/ci/portlist.go @@ -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() diff --git a/pr/githubapi/pull_request.go b/pr/githubapi/pull_request.go index 9cf8a97..058cbbb 100644 --- a/pr/githubapi/pull_request.go +++ b/pr/githubapi/pull_request.go @@ -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])