aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Tsay2012-01-05 19:23:58 (EST)
committerKevin Sawicki2012-01-05 19:23:58 (EST)
commit77a95f0bf4207eb4d31a2314981f9d135d18e565 (patch)
treebfbe9b0417ae5670be7470911341db11ee38f5a1
parent7cb2dc3358a5989bf28e950f479dc03e87c80228 (diff)
downloadegit-github-77a95f0bf4207eb4d31a2314981f9d135d18e565.zip
egit-github-77a95f0bf4207eb4d31a2314981f9d135d18e565.tar.gz
egit-github-77a95f0bf4207eb4d31a2314981f9d135d18e565.tar.bz2
Add missing id field to PullRequest model classrefs/changes/25/4925/2
Change-Id: Id9f9314c0f24c90c4fec6b6bd36fc83766f18b53 Signed-off-by: Kevin Sawicki <kevin@github.com>
-rwxr-xr-xorg.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestTest.java2
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/PullRequest.java18
2 files changed, 20 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestTest.java
index 3ba15f0..9903f77 100755
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestTest.java
@@ -61,6 +61,7 @@ public class PullRequestTest {
assertNull(request.getUrl());
assertNull(request.getUser());
assertNotNull(request.toString());
+ assertEquals(0, request.getId());
}
/**
@@ -105,6 +106,7 @@ public class PullRequestTest {
assertEquals("/url", request.setUrl("/url").getUrl());
User user = new User().setLogin("cuser");
assertEquals(user, request.setUser(user).getUser());
+ assertEquals(70, request.setId(70).getId());
}
/**
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/PullRequest.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/PullRequest.java
index 558c74f..b262ae7 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/PullRequest.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/PullRequest.java
@@ -35,6 +35,8 @@ public class PullRequest implements Serializable {
private Date createdAt;
+ private long id;
+
private int additions;
private int changedFiles;
@@ -491,6 +493,22 @@ public class PullRequest implements Serializable {
return this;
}
+ /**
+ * @return id
+ */
+ public long getId() {
+ return id;
+ }
+
+ /**
+ * @param id
+ * @return this pull request
+ */
+ public PullRequest setId(long id) {
+ this.id = id;
+ return this;
+ }
+
@Override
public String toString() {
return "Pull Request " + number; //$NON-NLS-1$