Created
December 20, 2013 22:16
-
-
Save mulby/8062522 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 50969db0d49cec1189693b9eb8dcd118cf206bcc Mon Sep 17 00:00:00 2001 | |
From: vagrant <vagrant@precise64.(none)> | |
Date: Thu, 19 Dec 2013 22:29:11 +0000 | |
Subject: [PATCH] fix compile errors | |
--- | |
github-oauth/pom.xml | 4 ++-- | |
github-plugin/pom.xml | 2 +- | |
.../github/wizard/PullRequestListController.java | 5 +++-- | |
.../github/git/PullRequestCreateChange.java | 9 +++++++-- | |
pom.xml | 2 +- | |
5 files changed, 14 insertions(+), 8 deletions(-) | |
diff --git a/github-oauth/pom.xml b/github-oauth/pom.xml | |
index f3acf76..8c71b29 100644 | |
--- a/github-oauth/pom.xml | |
+++ b/github-oauth/pom.xml | |
@@ -21,7 +21,7 @@ limitations under the License. | |
<parent> | |
<groupId>com.googlesource.gerrit.plugins.github</groupId> | |
<artifactId>github-parent</artifactId> | |
- <version>2.8-SNAPSHOT</version> | |
+ <version>2.8</version> | |
</parent> | |
<artifactId>github-oauth</artifactId> | |
<name>Gerrit Code Review - GitHub OAuth login</name> | |
@@ -107,7 +107,7 @@ limitations under the License. | |
<dependency> | |
<groupId>org.kohsuke</groupId> | |
<artifactId>github-api</artifactId> | |
- <version>1.44-SNAPSHOT</version> | |
+ <version>1.45</version> | |
</dependency> | |
<dependency> | |
<groupId>org.apache.httpcomponents</groupId> | |
diff --git a/github-plugin/pom.xml b/github-plugin/pom.xml | |
index a40b2fc..8b725d2 100644 | |
--- a/github-plugin/pom.xml | |
+++ b/github-plugin/pom.xml | |
@@ -20,7 +20,7 @@ limitations under the License. | |
<parent> | |
<artifactId>github-parent</artifactId> | |
<groupId>com.googlesource.gerrit.plugins.github</groupId> | |
- <version>2.8-SNAPSHOT</version> | |
+ <version>2.8</version> | |
</parent> | |
<artifactId>github-plugin</artifactId> | |
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..7c28f9e 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 | |
@@ -149,8 +149,9 @@ public class PullRequestListController implements VelocityController { | |
List<GHPullRequest> repoPullRequests = Lists.newArrayList(); | |
if (numPullRequests < config.pullRequestListLimit) { | |
- for (GHPullRequest ghPullRequest : GHRepository.listPullRequests( | |
- login.hub, ghOwner, ghRepoName, GHIssueState.OPEN)) { | |
+ GHRepository ghRepo = ghOwner.getRepository(ghRepoName); | |
+ for (GHPullRequest ghPullRequest : ghRepo.listPullRequests( | |
+ GHIssueState.OPEN)) { | |
if (isAnyCommitOfPullRequestToBeImported(db, gitRepo, | |
ghPullRequest)) { | |
diff --git a/github-plugin/src/main/java/com/googlesrouce/gerrit/plugins/github/git/PullRequestCreateChange.java b/github-plugin/src/main/java/com/googlesrouce/gerrit/plugins/github/git/PullRequestCreateChange.java | |
index 4a8943c..80df550 100644 | |
--- a/github-plugin/src/main/java/com/googlesrouce/gerrit/plugins/github/git/PullRequestCreateChange.java | |
+++ b/github-plugin/src/main/java/com/googlesrouce/gerrit/plugins/github/git/PullRequestCreateChange.java | |
@@ -15,8 +15,10 @@ | |
package com.googlesrouce.gerrit.plugins.github.git; | |
import java.io.IOException; | |
+import java.util.Date; | |
import java.util.Iterator; | |
import java.util.List; | |
+import java.sql.Timestamp; | |
import org.eclipse.jgit.errors.IncorrectObjectTypeException; | |
import org.eclipse.jgit.errors.MissingObjectException; | |
@@ -213,9 +215,11 @@ public class PullRequestCreateChange { | |
RefControl refControl, String pullRequestMessage, String topic, | |
boolean doValidation) throws OrmException, | |
InvalidChangeOperationException, IOException { | |
+ Date date = new Date(); | |
Change change = | |
new Change(changeKey, new Change.Id(db.nextChangeId()), | |
- pullRequestOwner, new Branch.NameKey(project, destRef.getName())); | |
+ pullRequestOwner, new Branch.NameKey(project, destRef.getName()), | |
+ new Timestamp(date.getTime())); | |
if (topic != null) { | |
change.setTopic(topic); | |
} | |
@@ -265,9 +269,10 @@ public class PullRequestCreateChange { | |
private ChangeMessage buildChangeMessage(ReviewDb db, Change dest, | |
Account.Id pullRequestAuthorId, String pullRequestMessage) | |
throws OrmException { | |
+ Date date = new Date(); | |
ChangeMessage cmsg = | |
new ChangeMessage(new ChangeMessage.Key(dest.getId(), | |
- ChangeUtil.messageUUID(db)), pullRequestAuthorId, null); | |
+ ChangeUtil.messageUUID(db)), pullRequestAuthorId, new Timestamp(date.getTime()), null); | |
cmsg.setMessage(pullRequestMessage); | |
return cmsg; | |
} | |
diff --git a/pom.xml b/pom.xml | |
index a83d34d..4455528 100644 | |
--- a/pom.xml | |
+++ b/pom.xml | |
@@ -18,7 +18,7 @@ limitations under the License. | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.googlesource.gerrit.plugins.github</groupId> | |
<artifactId>github-parent</artifactId> | |
- <version>2.8-SNAPSHOT</version> | |
+ <version>2.8</version> | |
<name>Gerrit Code Review - GitHub integration</name> | |
<url>http://www.gerritforge.com</url> | |
<packaging>pom</packaging> | |
-- | |
1.7.9.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment