Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-09-13 23:26:50 +0000
committerKevin Sawicki2011-09-13 23:26:50 +0000
commita65c225b6f25c9aefef8d3c40fcf30e2d00c6605 (patch)
tree82adc6e4ade464d033ba13be58fa20f50c110f03
parent4ccda13c25afe1962977c13c0ee4c54a668d30c4 (diff)
downloadegit-github-a65c225b6f25c9aefef8d3c40fcf30e2d00c6605.tar.gz
egit-github-a65c225b6f25c9aefef8d3c40fcf30e2d00c6605.tar.xz
egit-github-a65c225b6f25c9aefef8d3c40fcf30e2d00c6605.zip
Add mirror URL field to repository model
Change-Id: I15c596b1a7316e7daa8a9d620ea1980371343f73 Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryTest.java2
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Repository.java18
2 files changed, 20 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryTest.java
index 5f2bc565..5abe1779 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryTest.java
@@ -41,6 +41,7 @@ public class RepositoryTest {
assertNull(repo.getHtmlUrl());
assertNull(repo.getLanguage());
assertNull(repo.getMasterBranch());
+ assertNull(repo.getMirrorUrl());
assertNull(repo.getName());
assertEquals(0, repo.getOpenIssues());
assertNull(repo.getOwner());
@@ -95,6 +96,7 @@ public class RepositoryTest {
assertTrue(repo.setHasIssues(true).isHasIssues());
assertTrue(repo.setHasWiki(true).isHasWiki());
assertTrue(repo.setPrivate(true).isPrivate());
+ assertEquals("mirror", repo.setMirrorUrl("mirror").getMirrorUrl());
}
/**
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Repository.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Repository.java
index cb00b19e..b0c53f96 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Repository.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Repository.java
@@ -66,6 +66,8 @@ public class Repository implements IRepositoryIdProvider, Serializable {
private String masterBranch;
+ private String mirrorUrl;
+
private String name;
private String sshUrl;
@@ -397,6 +399,22 @@ public class Repository implements IRepositoryIdProvider, Serializable {
}
/**
+ * @return mirrorUrl
+ */
+ public String getMirrorUrl() {
+ return mirrorUrl;
+ }
+
+ /**
+ * @param mirrorUrl
+ * @return this repository
+ */
+ public Repository setMirrorUrl(String mirrorUrl) {
+ this.mirrorUrl = mirrorUrl;
+ return this;
+ }
+
+ /**
* @return name
*/
public String getName() {

Back to the top