diff --git a/prow/repoowners/repoowners.go b/prow/repoowners/repoowners.go index c6121070577d..82d3686bd9f5 100644 --- a/prow/repoowners/repoowners.go +++ b/prow/repoowners/repoowners.go @@ -270,6 +270,9 @@ func (c *Client) LoadRepoOwners(org, repo, base string) (RepoOwner, error) { if err != nil { return nil, fmt.Errorf("failed to get current SHA for %s: %v", fullName, err) } + if sha == "" { + return nil, fmt.Errorf("got an empty SHA for %s@heads/%s", fullName, base) + } log.WithField("duration", time.Since(start).String()).Debugf("Completed ghc.GetRef(%s, %s, %s)", org, repo, fmt.Sprintf("heads/%s", base)) entry, err := c.cacheEntryFor(org, repo, base, cloneRef, fullName, sha, log)