Skip to content
Permalink
Browse files

Fix JENKINS-40385: Use AbstractBuild rather than Build so it works fo…

…r Maven builds too
  • Loading branch information
Daniel15 committed Mar 4, 2017
1 parent 2c2dd13 commit 32aea3f6f0971d3c9976a7fc58a75be1e679d619
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/org/jenkinsci/plugins/githubissues/GitHubIssueNotifier.java
@@ -136,7 +136,7 @@ public void perform(
}

Result result = run.getResult();
final GitHubIssueAction previousGitHubIssueAction = getLatestIssueAction((Build) run.getPreviousBuild());
final GitHubIssueAction previousGitHubIssueAction = getLatestIssueAction((AbstractBuild) run.getPreviousBuild());
GHIssue issue = null;
if (previousGitHubIssueAction != null) {
issue = repo.getIssue(previousGitHubIssueAction.getIssueNumber());
@@ -189,13 +189,13 @@ public void perform(
}
}

private GitHubIssueAction getLatestIssueAction(Build previousBuild) {
private GitHubIssueAction getLatestIssueAction(AbstractBuild previousBuild) {
if (previousBuild != null) {
GitHubIssueAction previousGitHubIssueAction = previousBuild.getAction(GitHubIssueAction.class);
if (previousGitHubIssueAction != null) {
return previousGitHubIssueAction;
} else {
return this.getLatestIssueAction((Build) previousBuild.getPreviousBuild());
return this.getLatestIssueAction(previousBuild.getPreviousBuild());
}
}
return null;

0 comments on commit 32aea3f

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