Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-06-20 17:38:44 +0000
committerKevin Sawicki2011-06-20 17:38:44 +0000
commit86088517ea1a2130f2f2ae5b1ee08b7141bfda01 (patch)
tree3ff5c4cb4083999cdeda64e58f015eddff82e476 /org.eclipse.mylyn.github.core/src
parent428921aac3dfaa973d07fe64d72857e4a898daa9 (diff)
downloadegit-github-86088517ea1a2130f2f2ae5b1ee08b7141bfda01.tar.gz
egit-github-86088517ea1a2130f2f2ae5b1ee08b7141bfda01.tar.xz
egit-github-86088517ea1a2130f2f2ae5b1ee08b7141bfda01.zip
Migrate repository and pull request services to v3.
Searching for repositories still uses the v2 API which is why the two repository models are now required. Change-Id: I18700446790337031be2faf9114ff2bb581fdeb3 Signed-off-by: Kevin Sawicki <kevin@github.com>
Diffstat (limited to 'org.eclipse.mylyn.github.core/src')
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHub.java6
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java10
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueTaskDataHandler.java4
3 files changed, 10 insertions, 10 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHub.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHub.java
index 064e7629..bdc3d2f9 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHub.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHub.java
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.egit.github.core.Repository;
+import org.eclipse.egit.github.core.RepositoryId;
import org.eclipse.egit.github.core.client.RequestException;
/**
@@ -144,8 +144,8 @@ public class GitHub {
* @param repositoryUrl
* @return repository or null if not present in url
*/
- public static Repository getRepository(String repositoryUrl) {
- return Repository.createFromUrl(repositoryUrl);
+ public static RepositoryId getRepository(String repositoryUrl) {
+ return RepositoryId.createFromUrl(repositoryUrl);
}
/**
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java
index 3f978788..62d7966f 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java
@@ -31,7 +31,7 @@ import org.eclipse.egit.github.core.Comment;
import org.eclipse.egit.github.core.Issue;
import org.eclipse.egit.github.core.Label;
import org.eclipse.egit.github.core.Milestone;
-import org.eclipse.egit.github.core.Repository;
+import org.eclipse.egit.github.core.RepositoryId;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.IssueService;
import org.eclipse.egit.github.core.service.LabelService;
@@ -108,7 +108,7 @@ public class IssueConnector extends AbstractRepositoryConnector {
public List<Label> refreshLabels(TaskRepository repository)
throws CoreException {
Assert.isNotNull(repository, "Repository cannot be null"); //$NON-NLS-1$
- Repository repo = GitHub.getRepository(repository.getRepositoryUrl());
+ RepositoryId repo = GitHub.getRepository(repository.getRepositoryUrl());
GitHubClient client = createClient(repository);
LabelService service = new LabelService(client);
try {
@@ -158,7 +158,7 @@ public class IssueConnector extends AbstractRepositoryConnector {
public List<Milestone> refreshMilestones(TaskRepository repository)
throws CoreException {
Assert.isNotNull(repository, "Repository cannot be null"); //$NON-NLS-1$
- Repository repo = GitHub.getRepository(repository.getRepositoryUrl());
+ RepositoryId repo = GitHub.getRepository(repository.getRepositoryUrl());
GitHubClient client = createClient(repository);
MilestoneService service = new MilestoneService(client);
try {
@@ -256,7 +256,7 @@ public class IssueConnector extends AbstractRepositoryConnector {
monitor.beginTask(Messages.IssueConector_TaskQuerying, statuses.size());
try {
- Repository repo = GitHub.getRepository(repository
+ RepositoryId repo = GitHub.getRepository(repository
.getRepositoryUrl());
GitHubClient client = createClient(repository);
@@ -316,7 +316,7 @@ public class IssueConnector extends AbstractRepositoryConnector {
@Override
public TaskData getTaskData(TaskRepository repository, String taskId,
IProgressMonitor monitor) throws CoreException {
- Repository repo = GitHub.getRepository(repository.getRepositoryUrl());
+ RepositoryId repo = GitHub.getRepository(repository.getRepositoryUrl());
try {
GitHubClient client = createClient(repository);
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueTaskDataHandler.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueTaskDataHandler.java
index e11febb4..29ff7787 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueTaskDataHandler.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueTaskDataHandler.java
@@ -25,7 +25,7 @@ import org.eclipse.egit.github.core.Issue;
import org.eclipse.egit.github.core.Label;
import org.eclipse.egit.github.core.Milestone;
import org.eclipse.egit.github.core.PullRequest;
-import org.eclipse.egit.github.core.Repository;
+import org.eclipse.egit.github.core.RepositoryId;
import org.eclipse.egit.github.core.User;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.client.RequestException;
@@ -383,7 +383,7 @@ public class IssueTaskDataHandler extends AbstractTaskDataHandler {
IProgressMonitor monitor) throws CoreException {
String taskId = taskData.getTaskId();
Issue issue = createIssue(taskData);
- Repository repo = GitHub.getRepository(repository.getRepositoryUrl());
+ RepositoryId repo = GitHub.getRepository(repository.getRepositoryUrl());
try {
GitHubClient client = IssueConnector.createClient(repository);
updateLabels(repo.getOwner(), repo.getName(), client, repository,

Back to the top