Skip to content
Permalink
Browse files

refs JENKINS-45892

  • Loading branch information
rmpestano
rmpestano committed Mar 11, 2018
1 parent 2e41e8b commit ebe11aeea5e07641f89fbb0de8ce5796a17e700a
Showing with 15 additions and 3 deletions.
  1. +1 −1 pom.xml
  2. +14 −2 src/main/java/com/github/jenkins/lastchanges/LastChangesBuildAction.java
@@ -14,7 +14,7 @@

<properties>
<!-- Baseline Jenkins version you use to build the plugin. Users must have this version or newer to run. -->
<jenkins.version>1.642.1</jenkins.version>
<jenkins.version>2.103</jenkins.version>
<!-- Java Level to use. Java 7 required when using core >= 1.612 -->
<java.level>7</java.level>
<!-- Other properties you may want to use:
@@ -6,15 +6,17 @@
import com.github.jenkins.lastchanges.model.LastChangesConfig;
import hudson.model.Action;
import hudson.model.Run;
import jenkins.model.RunAction2;
import jenkins.tasks.SimpleBuildStep;
import org.kohsuke.stapler.StaplerProxy;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class LastChangesBuildAction extends LastChangesBaseAction implements SimpleBuildStep.LastBuildAction {
public class LastChangesBuildAction extends LastChangesBaseAction implements SimpleBuildStep.LastBuildAction, RunAction2 {

private final Run<?, ?> build;
private transient Run<?, ?> build;
private LastChanges buildChanges;
private LastChangesConfig config;
private List<LastChangesProjectAction> projectActions;
@@ -66,4 +68,14 @@ public CommitRenderer getCommit(String commitId) {
public Collection<? extends Action> getProjectActions() {
return this.projectActions;
}

@Override
public void onAttached(Run<?, ?> run) {
build = run;
}

@Override
public void onLoad(Run<?, ?> run) {
onAttached(run);
}
}

0 comments on commit ebe11ae

Please sign in to comment.
You can’t perform that action at this time.