-
-
Save anonymous/76b3e68cc316f94f1efb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.eclipse.egit.github.core.Repository; | |
import org.eclipse.egit.github.core.RepositoryBranch; | |
import org.eclipse.egit.github.core.RepositoryCommit; | |
import org.eclipse.egit.github.core.Commit; | |
import org.eclipse.egit.github.core.service.*; | |
public class GithubRepos { | |
/** | |
* @param args the command line arguments | |
*/ | |
public static void main(String[] args) throws IOException { | |
RepositoryService reposervice = new RepositoryService(); | |
CommitService commitservice = new CommitService(); | |
Repository repo = reposervice.getRepository("owner", "repo"); | |
List<RepositoryBranch> branches = reposervice.getBranches(repo); | |
List<RepositoryCommit> commits = null; | |
ArrayList<RepositoryCommit> allcommits = null; | |
for (RepositoryBranch brc: branches) { | |
commits = commitservice.getCommits(repo, brc.getName(), null); | |
allcommits = new ArrayList<RepositoryCommit>(commits); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment