Bump to GitHub-API to 1.48-SNAPSHOT
Changes proposed to Kohsuke have been merged into
the current master branch: pointing now to the new
development version SNAPSHOT.
Change-Id: I2eaf45dcc5acfa421d0162312320844f800c19b9
diff --git a/github-oauth/pom.xml b/github-oauth/pom.xml
index b228453..d8628af 100644
--- a/github-oauth/pom.xml
+++ b/github-oauth/pom.xml
@@ -107,7 +107,7 @@
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>github-api</artifactId>
- <version>1.44-SNAPSHOT</version>
+ <version>1.48-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
index 704d2b8..a4d2c85 100644
--- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
+++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
@@ -146,11 +146,11 @@
Repository gitRepo = repoMgr.openRepository(gerritRepoName);
try {
String ghRepoName = gerritRepoName.get().split("/")[1];
+ GHRepository githubRepo = login.hub.getRepository(gerritRepoName.get());
List<GHPullRequest> repoPullRequests = Lists.newArrayList();
if (numPullRequests < config.pullRequestListLimit) {
- for (GHPullRequest ghPullRequest : GHRepository.listPullRequests(
- login.hub, ghOwner, ghRepoName, GHIssueState.OPEN)) {
+ for (GHPullRequest ghPullRequest : githubRepo.listPullRequests(GHIssueState.OPEN)) {
if (isAnyCommitOfPullRequestToBeImported(db, gitRepo,
ghPullRequest)) {
diff --git a/github-plugin/src/main/java/com/googlesrouce/gerrit/plugins/github/git/PullRequestImportJob.java b/github-plugin/src/main/java/com/googlesrouce/gerrit/plugins/github/git/PullRequestImportJob.java
index c4a7673..534379b 100644
--- a/github-plugin/src/main/java/com/googlesrouce/gerrit/plugins/github/git/PullRequestImportJob.java
+++ b/github-plugin/src/main/java/com/googlesrouce/gerrit/plugins/github/git/PullRequestImportJob.java
@@ -37,6 +37,7 @@
import org.kohsuke.github.GHPullRequestCommitDetail.Authorship;
import org.kohsuke.github.GHRepository;
import org.kohsuke.github.GHUser;
+import org.kohsuke.github.GitUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -229,7 +230,7 @@
}
private com.google.gerrit.reviewdb.client.Account.Id getOrRegisterAccount(
- ReviewDb db, Authorship author) throws BadRequestException,
+ ReviewDb db, GitUser author) throws BadRequestException,
ResourceConflictException, UnprocessableEntityException, OrmException,
IOException {
return getOrRegisterAccount(db, author.getName(), author.getName(),