diff options
author | Kevin Sawicki | 2012-07-26 16:41:48 +0000 |
---|---|---|
committer | Kevin Sawicki | 2012-07-26 16:41:48 +0000 |
commit | d86f041d7fbc55c6c47213895da65974673125e5 (patch) | |
tree | 6ce7e90e415d3ca82b0adda384679ae3e02b9264 | |
parent | f0e4591c0b212c82e67cd7cb3d0728214172959c (diff) | |
download | egit-github-d86f041d7fbc55c6c47213895da65974673125e5.tar.gz egit-github-d86f041d7fbc55c6c47213895da65974673125e5.tar.xz egit-github-d86f041d7fbc55c6c47213895da65974673125e5.zip |
Add comment count field to Commit model class
Change-Id: I6c61df58daee9b5877e7d0e63caa58b436ec90d9
-rw-r--r-- | org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/CommitTest.java | 2 | ||||
-rw-r--r-- | org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Commit.java | 18 |
2 files changed, 20 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/CommitTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/CommitTest.java index f99a71fd..22d7a34e 100644 --- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/CommitTest.java +++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/CommitTest.java @@ -38,6 +38,7 @@ public class CommitTest { assertNull(commit.getSha()); assertNull(commit.getTree()); assertNull(commit.getUrl()); + assertEquals(0, commit.getCommentCount()); } /** @@ -59,5 +60,6 @@ public class CommitTest { tree.setSha("12345"); assertEquals(tree, commit.setTree(tree).getTree()); assertEquals("url", commit.setUrl("url").getUrl()); + assertEquals(32, commit.setCommentCount(32).getCommentCount()); } } diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Commit.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Commit.java index 4d753d85..9f17defb 100644 --- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Commit.java +++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Commit.java @@ -25,6 +25,8 @@ public class Commit implements Serializable { private CommitUser committer; + private int commentCount; + private List<Commit> parents; private String message; @@ -68,6 +70,22 @@ public class Commit implements Serializable { } /** + * @return commentCount + */ + public int getCommentCount() { + return commentCount; + } + + /** + * @param commentCount + * @return this commit + */ + public Commit setCommentCount(int commentCount) { + this.commentCount = commentCount; + return this; + } + + /** * @return parents */ public List<Commit> getParents() { |