Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xorg.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestTest.java3
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/PullRequest.java18
2 files changed, 21 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 8f1270bb..5d5ce64b 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
@@ -40,6 +40,7 @@ public class PullRequestTest {
public void defaultState() {
PullRequest request = new PullRequest();
assertNull(request.isMergeable());
+ assertNull(request.getMergeableState());
assertFalse(request.isMerged());
assertEquals(0, request.getAdditions());
assertNull(request.getBase());
@@ -81,6 +82,8 @@ public class PullRequestTest {
PullRequest request = new PullRequest();
assertTrue(request.setMerged(true).isMerged());
assertTrue(request.setMergeable(true).isMergeable());
+ assertEquals("clean", request.setMergeableState("clean")
+ .getMergeableState());
assertEquals(15, request.setAdditions(15).getAdditions());
PullRequestMarker base = new PullRequestMarker();
assertEquals(base, request.setBase(base).getBase());
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 2df4f767..c1f66720 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
@@ -28,6 +28,8 @@ public class PullRequest implements Serializable {
private Boolean mergeable;
+ private String mergeableState;
+
private boolean merged;
private Date closedAt;
@@ -114,6 +116,22 @@ public class PullRequest implements Serializable {
}
/**
+ * @return mergeableState
+ */
+ public String getMergeableState() {
+ return mergeableState;
+ }
+
+ /**
+ * @param mergeableState
+ * @return this pull request
+ */
+ public PullRequest setMergeableState(String mergeableState) {
+ this.mergeableState = mergeableState;
+ return this;
+ }
+
+ /**
* @return merged
*/
public boolean isMerged() {

Back to the top