diff --git a/server/handler.go b/server/handler.go index b8fb1036..cd825533 100644 --- a/server/handler.go +++ b/server/handler.go @@ -103,6 +103,8 @@ func (s *Server) GetIPA(c echo.Context) error { return echo.NewHTTPError(http.StatusInternalServerError, "IPA not found") } +var masterMerge = regexp.MustCompile(`^Merge pull request #([0-9]+) from (.*)$`) + func (s *Server) ListReleaseIOS(c echo.Context) error { html := `
branch | ` @@ -125,6 +127,18 @@ func (s *Server) ListReleaseIOS(c echo.Context) error { continue } + branchName := build.Branch + hover := "" + if build.Branch == "master" { + matches := masterMerge.FindAllStringSubmatch(build.Subject, -1) + if len(matches) == 1 && len(matches[0]) == 3 { + oncePerBranch["pull/"+matches[0][1]] = true + branchName = fmt.Sprintf("%s (%s)", build.Branch, matches[0][1]) + hover = matches[0][2] + } + + } + //out, _ := json.Marshal(build) //fmt.Println(string(out)) @@ -146,7 +160,7 @@ func (s *Server) ListReleaseIOS(c echo.Context) error { } elems := []string{ - fmt.Sprintf(`%s`, branchLink, branchColor, build.Branch), + fmt.Sprintf(`%s`, branchLink, hover, branchColor, branchName), fmt.Sprintf(`%d`, build.BuildURL, build.BuildNum), build.User.Login, //status, diff --git a/server/server.go b/server/server.go index 074d45f5..639753a9 100644 --- a/server/server.go +++ b/server/server.go @@ -139,7 +139,7 @@ func (s *Server) refreshCache() error { if s.cache.mostRecentBuild.IsZero() { // first fill log.Print("fetch all builds") - for page := 0; page < 10; page++ { + for page := 0; page < 20; page++ { builds, err := s.client.Builds("", "", 100, page*100) if err != nil { return err
---|