code: func (bs *BuildSummary) GitilesCommit() *buildbucketpb.GitilesCommit {
  	for _, bset := range bs.BuildSet {
  		if gc, ok := protoutil.ParseBuildSet(bset).(*buildbucketpb.GitilesCommit); ok {
  			return gc
  		}
  	}
  	return nil
  }
docs: // GitilesCommit extracts the first BuildSet which is a valid GitilesCommit.
  //
  // If no such BuildSet is found, this returns nil.