Skip to content

Commit

Permalink
removing fix for #2, waiting until next version to reimplement
Browse files Browse the repository at this point in the history
  • Loading branch information
monitorjbl committed Jun 21, 2015
1 parent d293ced commit 66ec9f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Expand Up @@ -44,11 +44,11 @@
<artifactId>stash-spi</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.stash</groupId>
<artifactId>stash-build-integration</artifactId>
<scope>provided</scope>
</dependency>
<!--<dependency>-->
<!--<groupId>com.atlassian.stash</groupId>-->
<!--<artifactId>stash-build-integration</artifactId>-->
<!--<scope>provided</scope>-->
<!--</dependency>-->
<dependency>
<groupId>com.atlassian.stash</groupId>
<artifactId>stash-scm-git-api</artifactId>
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/com/monitorjbl/plugins/PullRequestListener.java
@@ -1,7 +1,7 @@
package com.monitorjbl.plugins;

import com.atlassian.event.api.EventListener;
import com.atlassian.stash.build.BuildStatusSetEvent;
//import com.atlassian.stash.build.BuildStatusSetEvent;
import com.atlassian.stash.commit.Commit;
import com.atlassian.stash.event.pull.PullRequestApprovedEvent;
import com.atlassian.stash.event.pull.PullRequestOpenedEvent;
Expand Down Expand Up @@ -76,13 +76,13 @@ public void prApprovalListener(PullRequestApprovedEvent event) {
automergePullRequest(event.getPullRequest());
}

@EventListener
public void buildStatusListener(BuildStatusSetEvent event) {
PullRequest pr = findPRByCommitId(event.getCommitId());
if (pr != null) {
automergePullRequest(pr);
}
}
// @EventListener
// public void buildStatusListener(BuildStatusSetEvent event) {
// PullRequest pr = findPRByCommitId(event.getCommitId());
// if (pr != null) {
// automergePullRequest(pr);
// }
// }

void automergePullRequest(final PullRequest pr) {
Repository repo = pr.getToRef().getRepository();
Expand Down

0 comments on commit 66ec9f6

Please sign in to comment.