diff --git a/src/main/java/jenkins/plugins/hipchat/ActiveNotifier.java b/src/main/java/jenkins/plugins/hipchat/ActiveNotifier.java index 6576ec3..1818cfc 100644 --- a/src/main/java/jenkins/plugins/hipchat/ActiveNotifier.java +++ b/src/main/java/jenkins/plugins/hipchat/ActiveNotifier.java @@ -68,7 +68,7 @@ public void completed(AbstractBuild r) { || (result == Result.SUCCESS && previousResult == Result.FAILURE && jobProperty.getNotifyBackToNormal()) || (result == Result.SUCCESS && jobProperty.getNotifySuccess()) || (result == Result.UNSTABLE && jobProperty.getNotifyUnstable())) { - getHipChat(r).publish(getBuildStatusMessage(r), getBuildColor(r)); + getHipChat(r).publish(getBuildStatusMessage(r), getBuildColor(r), jobProperty.getAlwaysShowNotification()); } } @@ -84,7 +84,12 @@ String getChanges(AbstractBuild r) { Entry entry = (Entry) o; logger.info("Entry " + o); entries.add(entry); - files.addAll(entry.getAffectedFiles()); + try{ + files.addAll(entry.getAffectedFiles()); + } catch (UnsupportedOperationException e) { + logger.info(e.getMessage()); + return null; + } } if (entries.isEmpty()) { logger.info("Empty change..."); diff --git a/src/main/java/jenkins/plugins/hipchat/HipChatNotifier.java b/src/main/java/jenkins/plugins/hipchat/HipChatNotifier.java index d995851..7689aa4 100644 --- a/src/main/java/jenkins/plugins/hipchat/HipChatNotifier.java +++ b/src/main/java/jenkins/plugins/hipchat/HipChatNotifier.java @@ -33,19 +33,19 @@ public DescriptorImpl getDescriptor() { } public String getRoom() { - return room; + return this.room; } public String getAuthToken() { - return authToken; + return this.authToken; } public String getBuildServerUrl() { - return buildServerUrl; + return this.buildServerUrl; } public String getSendAs() { - return sendAs; + return this.sendAs; } @@ -144,6 +144,7 @@ public static class HipChatJobProperty extends hudson.model.JobProperty - - - - + + + + - - - + + + @@ -33,6 +33,9 @@ + + +