Skip to content

Commit

Permalink
Fix #212, Closes #341
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidTanner committed Oct 12, 2015
1 parent 7fe9c37 commit 223a968
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/org/jenkinsci/plugins/ghprb/GhprbWebHook.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.jenkinsci.plugins.ghprb;

import hudson.model.AbstractProject;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -34,7 +36,12 @@ public boolean matchRepo(String hookRepoName) {
}

public String getProjectName() {
return trigger.getActualProject().getFullName();
AbstractProject<?, ?> project = trigger.getActualProject();
if (project != null) {
return project.getFullName();
} else {
return "NOT STARTED";
}
}

public void handleComment(IssueComment issueComment) throws IOException {
Expand Down

0 comments on commit 223a968

Please sign in to comment.