prow/config/jobs.go
func (c *JobConfig) AllPresubmits(repos []string) []Presubmit {
	var res []Presubmit

	for repo, v := range c.Presubmits {
		if len(repos) == 0 {
			res = append(res, v...)
		} else {
			for _, r := range repos {
				if r == repo {
					res = append(res, v...)
					break
				}
			}
		}
	}

	return res
}
func (c *JobConfig) AllPresubmits(repos []string) []Presubmit {
	var res []Presubmit

	for repo, v := range c.Presubmits {
		if len(repos) == 0 {
			res = append(res, v...)
		} else {
			for _, r := range repos {
				if r == repo {
					res = append(res, v...)
					break
				}
			}
		}
	}

	return res
}
func ( c * JobConfig ) AllPresubmits ( repos [ ] string ) [ ] Presubmit { var res [ ] Presubmit for repo , v := range c . Presubmits { if len ( repos ) == 0 { res = append ( res , v ... ) } else { for _ , r := range repos { if r == repo { res = append ( res , v ... ) break } } } } return res }
// AllPresubmits returns all prow presubmit jobs in repos.
// if repos is empty, return all presubmits.
AllPresubmits returns all prow presubmit jobs in repos . if repos is empty return all presubmits .