Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refs JENKINS-45892
  • Loading branch information
rmpestano committed Mar 11, 2018
1 parent 2e41e8b commit ebe11ae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -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:
Expand Down
Expand Up @@ -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;
Expand Down Expand Up @@ -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.