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

Commit

Permalink
Adding REVIEWED as trigger #191
Browse files Browse the repository at this point in the history
 * This is what happens when reviewer clicks "needs work".
  • Loading branch information
tomasbjerre committed Feb 1, 2017
1 parent 48b7b74 commit 020dfc3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
Changelog of Pull Request Notifier for Bitbucket.

## Unreleased
### GitHub [#191](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/191) Notification for "Needs Work"
Adding REVIEWED as trigger

* This is what happens when reviewer clicks "needs work".

[f0755ff21dc7ae2](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/f0755ff21dc7ae2) Tomas Bjerre *2017-02-01 18:16:39*

### No issue
doc

[8cb27b306f10201](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/8cb27b306f10201) Tomas Bjerre *2017-01-30 18:28:23*
[48b7b744a94f01e](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/48b7b744a94f01e) Tomas Bjerre *2017-01-30 18:28:50*

## 2.50
### GitHub [#190](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/190) button forms: descriptions not showing for types input and textarea
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package se.bjurr.prnfb.listener;

import se.bjurr.prnfb.settings.PrnfbNotification;

import com.atlassian.bitbucket.event.pull.PullRequestEvent;
import com.atlassian.bitbucket.event.pull.PullRequestRescopedEvent;

import se.bjurr.prnfb.settings.PrnfbNotification;

public enum PrnfbPullRequestAction {
APPROVED, //
BUTTON_TRIGGER, //
Expand All @@ -17,7 +17,8 @@ public enum PrnfbPullRequestAction {
RESCOPED_FROM, //
RESCOPED_TO, //
UNAPPROVED, //
UPDATED;
UPDATED,
REVIEWED; //

public static PrnfbPullRequestAction fromPullRequestEvent(
PullRequestEvent event, PrnfbNotification notification) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.slf4j.Logger;

import com.atlassian.bitbucket.event.pull.PullRequestApprovedEvent;
import com.atlassian.bitbucket.event.pull.PullRequestCommentAddedEvent;
import com.atlassian.bitbucket.event.pull.PullRequestCommentDeletedEvent;
import com.atlassian.bitbucket.event.pull.PullRequestCommentEditedEvent;
Expand All @@ -31,9 +30,9 @@
import com.atlassian.bitbucket.event.pull.PullRequestEvent;
import com.atlassian.bitbucket.event.pull.PullRequestMergedEvent;
import com.atlassian.bitbucket.event.pull.PullRequestOpenedEvent;
import com.atlassian.bitbucket.event.pull.PullRequestParticipantStatusUpdatedEvent;
import com.atlassian.bitbucket.event.pull.PullRequestReopenedEvent;
import com.atlassian.bitbucket.event.pull.PullRequestRescopedEvent;
import com.atlassian.bitbucket.event.pull.PullRequestUnapprovedEvent;
import com.atlassian.bitbucket.event.pull.PullRequestUpdatedEvent;
import com.atlassian.bitbucket.pull.PullRequest;
import com.atlassian.bitbucket.pull.PullRequestService;
Expand Down Expand Up @@ -273,7 +272,7 @@ public NotificationResponse notify(
}

@EventListener
public void onEvent(@SuppressWarnings("deprecation") PullRequestApprovedEvent e) {
public void onEvent(PullRequestParticipantStatusUpdatedEvent e) {
handleEventAsync(e);
}

Expand Down Expand Up @@ -322,11 +321,6 @@ public void onEvent(final PullRequestRescopedEvent e) {
handleEventAsync(e);
}

@EventListener
public void onEvent(@SuppressWarnings("deprecation") PullRequestUnapprovedEvent e) {
handleEventAsync(e);
}

@EventListener
public void onEvent(PullRequestUpdatedEvent e) {
handleEventAsync(e);
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/admin.vm
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@
<label>
<input class="checkbox" type="checkbox" name="triggers[]" value="RESCOPED_TO">RESCOPED_TO, new commits on target branch.</label>
</div>
<div class="checkbox">
<label>
<input class="checkbox" type="checkbox" name="triggers[]" value="REVIEWED">REVIEWED, participant updates status to NEEDS_WORK</label>
</div>
<div class="checkbox">
<label>
<input class="checkbox" type="checkbox" name="triggers[]" value="UNAPPROVED">UNAPPROVED</label>
Expand Down

0 comments on commit 020dfc3

Please sign in to comment.