private static VcsTaskHandler.TaskInfo fromBranches(List<? extends BranchInfo> branches) {
    if (branches.isEmpty()) return new VcsTaskHandler.TaskInfo(null, Collections.emptyList());
    MultiMap<String, String> map = new MultiMap<>();
    for (BranchInfo branch : branches) {
      map.putValue(branch.name, branch.repository);
    }
    Map.Entry<String, Collection<String>> next = map.entrySet().iterator().next();
    return new VcsTaskHandler.TaskInfo(next.getKey(), next.getValue());
  }
private static VcsTaskHandler.TaskInfo fromBranches(List<? extends BranchInfo> branches)