diff --git a/CHANGELOG.md b/CHANGELOG.md index a264c429..38a909e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/main/java/se/bjurr/prnfb/listener/PrnfbPullRequestAction.java b/src/main/java/se/bjurr/prnfb/listener/PrnfbPullRequestAction.java index 7135f44f..9e4c01a6 100644 --- a/src/main/java/se/bjurr/prnfb/listener/PrnfbPullRequestAction.java +++ b/src/main/java/se/bjurr/prnfb/listener/PrnfbPullRequestAction.java @@ -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, // @@ -17,7 +17,8 @@ public enum PrnfbPullRequestAction { RESCOPED_FROM, // RESCOPED_TO, // UNAPPROVED, // - UPDATED; + UPDATED, + REVIEWED; // public static PrnfbPullRequestAction fromPullRequestEvent( PullRequestEvent event, PrnfbNotification notification) { diff --git a/src/main/java/se/bjurr/prnfb/listener/PrnfbPullRequestEventListener.java b/src/main/java/se/bjurr/prnfb/listener/PrnfbPullRequestEventListener.java index ce8cb54e..c962430f 100644 --- a/src/main/java/se/bjurr/prnfb/listener/PrnfbPullRequestEventListener.java +++ b/src/main/java/se/bjurr/prnfb/listener/PrnfbPullRequestEventListener.java @@ -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; @@ -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; @@ -273,7 +272,7 @@ public NotificationResponse notify( } @EventListener - public void onEvent(@SuppressWarnings("deprecation") PullRequestApprovedEvent e) { + public void onEvent(PullRequestParticipantStatusUpdatedEvent e) { handleEventAsync(e); } @@ -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); diff --git a/src/main/resources/admin.vm b/src/main/resources/admin.vm index 13fb4f0a..de268dcb 100644 --- a/src/main/resources/admin.vm +++ b/src/main/resources/admin.vm @@ -404,6 +404,10 @@ +