gitTree = new TreeService(AuthServices.getGitHubClient()).getTree(gitRepo, gitTree.getSha());
} catch (Exception ex) {
ex.printStackTrace();
}
EntityTree tree = null;//getTreeByURL(gitTree.getUrl(), dao);
if (tree == null) {
tree = new EntityTree();
}
tree.setMineredAt(new Date());
tree.setSha(gitTree.getSha());
tree.setUrl(gitTree.getUrl());
if (tree.getId() == null || tree.getId().equals(0l)) {
dao.insert(tree);
} else {
dao.edit(tree);
}