Commit 2061da69 authored by Tim Olshansky's avatar Tim Olshansky

Merge pull request #30 from thomasehardt/master

Added method to get all commits for a project
parents e6a337f8 553075ae
......@@ -580,6 +580,13 @@ public class GitlabAPI {
return Arrays.asList(commits);
}
// gets all commits for a project
public List<GitlabCommit> getAllCommits(String projectId) throws IOException {
String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + "/repository/commits";
GitlabCommit[] commits = retrieve().to(tailUrl, GitlabCommit[].class);
return Arrays.asList(commits);
}
// List commit diffs for a project ID and commit hash
// GET /projects/:id/repository/commits/:sha/diff
public List<GitlabCommitDiff> getCommitDiffs(String projectId, String commitHash) throws IOException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment