Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java3
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java5
2 files changed, 3 insertions, 5 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java
index 8e66be6b..d60c3ef3 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java
@@ -268,8 +268,7 @@ public class RepositoryServiceTest {
@Test
public void forkRepositoryToOrg() throws IOException {
service.forkRepository(repo, "abc");
- verify(client).post("/repos/o/n/forks",
- Collections.singletonMap("org", "abc"), Repository.class);
+ verify(client).post("/repos/o/n/forks?org=abc", null, Repository.class);
}
/**
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java
index 7e9dae70..d77069f0 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java
@@ -772,10 +772,9 @@ public class RepositoryService extends GitHubService {
StringBuilder uri = new StringBuilder(SEGMENT_REPOS);
uri.append('/').append(id);
uri.append(SEGMENT_FORKS);
- Map<String, String> params = null;
if (organization != null)
- params = Collections.singletonMap("org", organization); //$NON-NLS-1$
- return client.post(uri.toString(), params, Repository.class);
+ uri.append("?org=").append(organization);
+ return client.post(uri.toString(), null, Repository.class);
}
/**

Back to the top