diff --git a/pom.xml b/pom.xml index 77bef926..336268c7 100644 --- a/pom.xml +++ b/pom.xml @@ -262,9 +262,9 @@ under the License. - org.eclipse.mylyn.github - org.eclipse.egit.github.core - 2.1.5 + org.kohsuke + github-api + 1.326 com.google.code.gson diff --git a/src/main/java/org/apache/maven/plugins/github/GitHubDownloader.java b/src/main/java/org/apache/maven/plugins/github/GitHubDownloader.java index 410deab0..5c0fa039 100644 --- a/src/main/java/org/apache/maven/plugins/github/GitHubDownloader.java +++ b/src/main/java/org/apache/maven/plugins/github/GitHubDownloader.java @@ -22,9 +22,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; -import java.util.HashMap; +import java.util.Collection; import java.util.List; -import java.util.Map; import org.apache.maven.plugin.logging.Log; import org.apache.maven.plugins.issues.Issue; @@ -35,9 +34,10 @@ import org.apache.maven.settings.crypto.DefaultSettingsDecryptionRequest; import org.apache.maven.settings.crypto.SettingsDecrypter; import org.apache.maven.settings.crypto.SettingsDecryptionResult; -import org.eclipse.egit.github.core.Label; -import org.eclipse.egit.github.core.client.GitHubClient; -import org.eclipse.egit.github.core.service.IssueService; +import org.kohsuke.github.GHIssue; +import org.kohsuke.github.GHIssueState; +import org.kohsuke.github.GHLabel; +import org.kohsuke.github.GitHubBuilder; /** * @since 2.8 @@ -47,7 +47,7 @@ public class GitHubDownloader { /** * The github client. */ - private GitHubClient client; + private GitHubBuilder client; /** * A boolean to indicate if we should include open issues as well @@ -80,7 +80,7 @@ public GitHubDownloader( int githubPort, boolean includeOpenIssues, boolean onlyMilestoneIssues) - throws MalformedURLException { + throws IOException { this.includeOpenIssues = includeOpenIssues; this.onlyMilestoneIssues = onlyMilestoneIssues; @@ -89,9 +89,9 @@ public GitHubDownloader( // The githubclient prefers to connect to 'github.com' using the api domain, unlike github enterprise // which can connect fine using its domain, so for github.com use empty constructor if (githubURL.getHost().equalsIgnoreCase("github.com")) { - this.client = new GitHubClient(); + this.client = new GitHubBuilder(); } else { - this.client = new GitHubClient(githubURL.getHost(), githubPort, githubScheme); + this.client = new GitHubBuilder().withEndpoint(githubScheme + githubURL.getHost() + githubPort); } this.githubIssueURL = project.getIssueManagement().getUrl(); @@ -119,7 +119,7 @@ public GitHubDownloader( this.githubRepo = urlPathParts[1]; } - protected Issue createIssue(org.eclipse.egit.github.core.Issue githubIssue) { + protected Issue createIssue(GHIssue githubIssue) throws IOException { Issue issue = new Issue(); issue.setKey(String.valueOf(githubIssue.getNumber())); @@ -155,9 +155,9 @@ protected Issue createIssue(org.eclipse.egit.github.core.Issue githubIssue) { issue.setStatus("open"); } - List