Skip to content

Commit c982e00

Browse files
committed
Adaptation to the released GitHub API 1.45
The Kohsuke's GitHub API 1.44-SNAPSHOT did not include all of my proposed changes: need then to adapt to what has been included in Ver. 1.45 even by making one extra GitHub API call (that I wanted to avoid) to fetch the project again. Change-Id: I803ac1dbb615366f662c2515bf0ac84d56acd820
1 parent 143e4aa commit c982e00

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

github-oauth/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ limitations under the License.
107107
<dependency>
108108
<groupId>org.kohsuke</groupId>
109109
<artifactId>github-api</artifactId>
110-
<version>1.44-SNAPSHOT</version>
110+
<version>1.45</version>
111111
</dependency>
112112
<dependency>
113113
<groupId>org.apache.httpcomponents</groupId>

github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ private Map<String, List<GHPullRequest>> getPullRequests(GitHubLogin login,
149149
List<GHPullRequest> repoPullRequests = Lists.newArrayList();
150150

151151
if (numPullRequests < config.pullRequestListLimit) {
152-
for (GHPullRequest ghPullRequest : GHRepository.listPullRequests(
153-
login.hub, ghOwner, ghRepoName, GHIssueState.OPEN)) {
152+
List<GHPullRequest> pullRequests =
153+
login.getMyself().getRepository(ghRepoName).getPullRequests(GHIssueState.OPEN);
154+
for (GHPullRequest ghPullRequest : pullRequests) {
154155

155156
if (isAnyCommitOfPullRequestToBeImported(db, gitRepo,
156157
ghPullRequest)) {

0 commit comments

Comments
 (0)