aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorS.Nishio <nishio@densan-labs.net>2015-07-17 02:00:19 +0900
committerS.Nishio <nishio@densan-labs.net>2015-07-17 02:00:19 +0900
commit5ce7591f5f403388cf3a4b07a11d658fd65cd508 (patch)
treeef6a6afc547c6f6242dc8f1f01f7de764f9adf9f
parentcbfec1e60e0a922880b51674d1cd06f6b1ee87d5 (diff)
parent5a4727ed6304aba33ab9f9115f961c02d860da39 (diff)
downloadbbprb-5ce7591f5f403388cf3a4b07a11d658fd65cd508.tar.gz
Merge pull request #16 from exi/specify-git-revision
Specify git revision
-rw-r--r--pom.xml45
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java3
2 files changed, 27 insertions, 21 deletions
diff --git a/pom.xml b/pom.xml
index 457a8a7..234d250 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,26 +36,31 @@
</repositories>
<dependencies>
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-http</artifactId>
- <version>2.4</version>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.1</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.9</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-jaxrs</artifactId>
- <version>1.9.13</version>
- </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-jaxrs</artifactId>
+ <version>1.9.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.hudson.plugins</groupId>
+ <artifactId>git</artifactId>
+ <version>3.0.1</version>
+ </dependency>
</dependencies>
<pluginRepositories>
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java
index 3934f92..7b72562 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java
@@ -4,6 +4,7 @@ import antlr.ANTLRException;
import hudson.Extension;
import hudson.model.*;
import hudson.model.queue.QueueTaskFuture;
+import hudson.plugins.git.RevisionParameterAction;
import hudson.triggers.Trigger;
import hudson.triggers.TriggerDescriptor;
import net.sf.json.JSONObject;
@@ -129,7 +130,7 @@ public class BitbucketBuildTrigger extends Trigger<AbstractProject<?, ?>> {
values.put("destinationRepositoryOwner", new StringParameterValue("destinationRepositoryOwner", cause.getDestinationRepositoryOwner()));
values.put("destinationRepositoryName", new StringParameterValue("destinationRepositoryName", cause.getDestinationRepositoryName()));
values.put("pullRequestTitle", new StringParameterValue("pullRequestTitle", cause.getPullRequestTitle()));
- return this.job.scheduleBuild2(0, cause, new ParametersAction(new ArrayList(values.values())));
+ return this.job.scheduleBuild2(0, cause, new ParametersAction(new ArrayList(values.values())), new RevisionParameterAction(cause.getCommitHash()));
}
private Map<String, ParameterValue> getDefaultParameters() {