use of org.kohsuke.github.GHBranch in project faber by mkuschov.
the class GitLoader method GetWatchedReposTrees.
public HashMap<GHRepository, HashMap<GHBranch, GHTree>> GetWatchedReposTrees() {
HashMap<GHRepository, HashMap<GHBranch, GHTree>> watchedReposTrees = new HashMap<>();
this.watchedRepos.forEach(i -> {
HashMap<GHBranch, GHTree> tmp = new HashMap<>();
try {
i.getBranches().forEach((name, branch) -> {
try {
GHTree urlToBracnhTree = i.getTreeRecursive(branch.getSHA1(), 1);
tmp.put(branch, urlToBracnhTree);
System.out.println(i.getName() + " " + branch.getName() + " " + urlToBracnhTree.toString());
} catch (IOException e) {
e.printStackTrace();
}
});
watchedReposTrees.put(i, tmp);
} catch (IOException e) {
e.printStackTrace();
}
});
return watchedReposTrees;
}
Aggregations