Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Commit

Permalink
Wording of new trigger conditions #68
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Sep 26, 2015
1 parent a976148 commit 737d040
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Changelog of Pull Request Notifier for Bitbucket.

## 2.4
* Changing wording of trigger conditions in admin GUI.

## 2.3
* Bugfix: Loading CSS and JS in admin-page

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package se.bjurr.prnfb.listener;

import static com.google.common.base.Optional.absent;
import static com.google.common.base.Optional.of;
import static com.google.common.collect.Maps.newHashMap;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
Expand Down Expand Up @@ -150,7 +151,7 @@ public void notify(final PrnfbNotification notification, PrnfbPullRequestAction

Optional<String> postContent = absent();
if (notification.getPostContent().isPresent()) {
postContent = Optional.of(renderer.render(notification.getPostContent().get()));
postContent = of(renderer.render(notification.getPostContent().get()));
}
String renderedUrl = renderer.render(notification.getUrl());
logger.info(notification.getName() + " > " //
Expand All @@ -163,9 +164,11 @@ public void notify(final PrnfbNotification notification, PrnfbPullRequestAction
.withPostContent(postContent)//
.appendBasicAuth(notification);
for (Header header : notification.getHeaders()) {
urlInvoker.withHeader(header.getName(), renderer.render(header.getValue()));
urlInvoker//
.withHeader(header.getName(), renderer.render(header.getValue()));
}
invoker.invoke(urlInvoker.withProxyServer(notification.getProxyServer()) //
invoker.invoke(urlInvoker//
.withProxyServer(notification.getProxyServer()) //
.withProxyPort(notification.getProxyPort())//
.withProxyUser(notification.getProxyUser())//
.withProxyPassword(notification.getProxyPassword()));
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/admin.vm
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@
</div>
<div>
<fieldset>
<legend>Trigger if pull request</legend>
<label><input type="radio" name="trigger_if_isconflicting" value="ALWAYS">Has, or has no, merge conflicts</label><br>
<label><input type="radio" name="trigger_if_isconflicting" value="NOT_CONFLICTING">Has no merge conflicts</label><br>
<label><input type="radio" name="trigger_if_isconflicting" value="CONFLICTING">Has merge conflicts</label><br>
<legend>Triggers apply</legend>
<label><input type="radio" name="trigger_if_isconflicting" value="ALWAYS">Always</label><br>
<label><input type="radio" name="trigger_if_isconflicting" value="NOT_CONFLICTING">To PRs without merge conflicts</label><br>
<label><input type="radio" name="trigger_if_isconflicting" value="CONFLICTING">To PRs with merge conflicts</label><br>
</fieldset>
</div>
<div>
Expand Down

0 comments on commit 737d040

Please sign in to comment.