Skip to content

Commit

Permalink
Merge pull request #22329 from stevekuznetsov/skuznets/check-empty-sha
Browse files Browse the repository at this point in the history
prow: check for empty refs on fetch call
  • Loading branch information
k8s-ci-robot authored May 27, 2021
2 parents 88fab4f + 036f593 commit ae26658
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions prow/repoowners/repoowners.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ae26658

Please sign in to comment.