code: func (c Checkout) ToGitilesCommits() notifypb.GitilesCommits {
  	result := notifypb.GitilesCommits{
  		Commits: make([]*buildbucketpb.GitilesCommit, 0, len(c)),
  	}
  	for repo, commit := range c {
  		host, project, _ := gitiles.ParseRepoURL(repo)
  		result.Commits = append(result.Commits, &buildbucketpb.GitilesCommit{
  			Host:    host,
  			Project: project,
  			Id:      commit,
  		})
  	}
  	// Sort commits, first by host, then by project.
  	sort.Slice(result.Commits, func(i, j int) bool {
  		first := result.Commits[i]
  		second := result.Commits[j]
  		hostResult := strings.Compare(first.Host, second.Host)
  		if hostResult == 0 {
  			return strings.Compare(first.Project, second.Project) < 0
  		}
  		return hostResult < 0
  	})
  	return result
  }
docs: // ToGitilesCommits converts the Checkout into a set of GitilesCommits which may
  // be stored as part of a config.Builder.