prow/config/tide.go
func (tq *TideQuery) Query() string {
	toks := []string{"is:pr", "state:open"}
	for _, o := range tq.Orgs {
		toks = append(toks, fmt.Sprintf("org:\"%s\"", o))
	}
	for _, r := range tq.Repos {
		toks = append(toks, fmt.Sprintf("repo:\"%s\"", r))
	}
	for _, r := range tq.ExcludedRepos {
		toks = append(toks, fmt.Sprintf("-repo:\"%s\"", r))
	}
	for _, b := range tq.ExcludedBranches {
		toks = append(toks, fmt.Sprintf("-base:\"%s\"", b))
	}
	for _, b := range tq.IncludedBranches {
		toks = append(toks, fmt.Sprintf("base:\"%s\"", b))
	}
	for _, l := range tq.Labels {
		toks = append(toks, fmt.Sprintf("label:\"%s\"", l))
	}
	for _, l := range tq.MissingLabels {
		toks = append(toks, fmt.Sprintf("-label:\"%s\"", l))
	}
	if tq.Milestone != "" {
		toks = append(toks, fmt.Sprintf("milestone:\"%s\"", tq.Milestone))
	}
	if tq.ReviewApprovedRequired {
		toks = append(toks, "review:approved")
	}
	return strings.Join(toks, " ")
}
func (tq *TideQuery) Query() string {
	toks := []string{"is:pr", "state:open"}
	for _, o := range tq.Orgs {
		toks = append(toks, fmt.Sprintf("org:\"%s\"", o))
	}
	for _, r := range tq.Repos {
		toks = append(toks, fmt.Sprintf("repo:\"%s\"", r))
	}
	for _, r := range tq.ExcludedRepos {
		toks = append(toks, fmt.Sprintf("-repo:\"%s\"", r))
	}
	for _, b := range tq.ExcludedBranches {
		toks = append(toks, fmt.Sprintf("-base:\"%s\"", b))
	}
	for _, b := range tq.IncludedBranches {
		toks = append(toks, fmt.Sprintf("base:\"%s\"", b))
	}
	for _, l := range tq.Labels {
		toks = append(toks, fmt.Sprintf("label:\"%s\"", l))
	}
	for _, l := range tq.MissingLabels {
		toks = append(toks, fmt.Sprintf("-label:\"%s\"", l))
	}
	if tq.Milestone != "" {
		toks = append(toks, fmt.Sprintf("milestone:\"%s\"", tq.Milestone))
	}
	if tq.ReviewApprovedRequired {
		toks = append(toks, "review:approved")
	}
	return strings.Join(toks, " ")
}
func ( tq * TideQuery ) Query ( ) string { toks := [ ] string { " " , " " } for _ , o := range tq . Orgs { toks = append ( toks , fmt . Sprintf ( " \" \" " , o ) ) } for _ , r := range tq . Repos { toks = append ( toks , fmt . Sprintf ( " \" \" " , r ) ) } for _ , r := range tq . ExcludedRepos { toks = append ( toks , fmt . Sprintf ( " \" \" " , r ) ) } for _ , b := range tq . ExcludedBranches { toks = append ( toks , fmt . Sprintf ( " \" \" " , b ) ) } for _ , b := range tq . IncludedBranches { toks = append ( toks , fmt . Sprintf ( " \" \" " , b ) ) } for _ , l := range tq . Labels { toks = append ( toks , fmt . Sprintf ( " \" \" " , l ) ) } for _ , l := range tq . MissingLabels { toks = append ( toks , fmt . Sprintf ( " \" \" " , l ) ) } if tq . Milestone != " " { toks = append ( toks , fmt . Sprintf ( " \" \" " , tq . Milestone ) ) } if tq . ReviewApprovedRequired { toks = append ( toks , " " ) } return strings . Join ( toks , " " ) }
// Query returns the corresponding github search string for the tide query.
Query returns the corresponding github search string for the tide query .