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

Commit 020dfc3

Browse files
committed
Adding REVIEWED as trigger #191
* This is what happens when reviewer clicks "needs work".
1 parent 48b7b74 commit 020dfc3

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@
33
Changelog of Pull Request Notifier for Bitbucket.
44

55
## Unreleased
6+
### GitHub [#191](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/191) Notification for "Needs Work"
7+
Adding REVIEWED as trigger
8+
9+
* This is what happens when reviewer clicks "needs work".
10+
11+
[f0755ff21dc7ae2](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/f0755ff21dc7ae2) Tomas Bjerre *2017-02-01 18:16:39*
12+
613
### No issue
714
doc
815

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

1118
## 2.50
1219
### GitHub [#190](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/190) button forms: descriptions not showing for types input and textarea

src/main/java/se/bjurr/prnfb/listener/PrnfbPullRequestAction.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package se.bjurr.prnfb.listener;
22

3-
import se.bjurr.prnfb.settings.PrnfbNotification;
4-
53
import com.atlassian.bitbucket.event.pull.PullRequestEvent;
64
import com.atlassian.bitbucket.event.pull.PullRequestRescopedEvent;
75

6+
import se.bjurr.prnfb.settings.PrnfbNotification;
7+
88
public enum PrnfbPullRequestAction {
99
APPROVED, //
1010
BUTTON_TRIGGER, //
@@ -17,7 +17,8 @@ public enum PrnfbPullRequestAction {
1717
RESCOPED_FROM, //
1818
RESCOPED_TO, //
1919
UNAPPROVED, //
20-
UPDATED;
20+
UPDATED,
21+
REVIEWED; //
2122

2223
public static PrnfbPullRequestAction fromPullRequestEvent(
2324
PullRequestEvent event, PrnfbNotification notification) {

src/main/java/se/bjurr/prnfb/listener/PrnfbPullRequestEventListener.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import org.slf4j.Logger;
2323

24-
import com.atlassian.bitbucket.event.pull.PullRequestApprovedEvent;
2524
import com.atlassian.bitbucket.event.pull.PullRequestCommentAddedEvent;
2625
import com.atlassian.bitbucket.event.pull.PullRequestCommentDeletedEvent;
2726
import com.atlassian.bitbucket.event.pull.PullRequestCommentEditedEvent;
@@ -31,9 +30,9 @@
3130
import com.atlassian.bitbucket.event.pull.PullRequestEvent;
3231
import com.atlassian.bitbucket.event.pull.PullRequestMergedEvent;
3332
import com.atlassian.bitbucket.event.pull.PullRequestOpenedEvent;
33+
import com.atlassian.bitbucket.event.pull.PullRequestParticipantStatusUpdatedEvent;
3434
import com.atlassian.bitbucket.event.pull.PullRequestReopenedEvent;
3535
import com.atlassian.bitbucket.event.pull.PullRequestRescopedEvent;
36-
import com.atlassian.bitbucket.event.pull.PullRequestUnapprovedEvent;
3736
import com.atlassian.bitbucket.event.pull.PullRequestUpdatedEvent;
3837
import com.atlassian.bitbucket.pull.PullRequest;
3938
import com.atlassian.bitbucket.pull.PullRequestService;
@@ -273,7 +272,7 @@ public NotificationResponse notify(
273272
}
274273

275274
@EventListener
276-
public void onEvent(@SuppressWarnings("deprecation") PullRequestApprovedEvent e) {
275+
public void onEvent(PullRequestParticipantStatusUpdatedEvent e) {
277276
handleEventAsync(e);
278277
}
279278

@@ -322,11 +321,6 @@ public void onEvent(final PullRequestRescopedEvent e) {
322321
handleEventAsync(e);
323322
}
324323

325-
@EventListener
326-
public void onEvent(@SuppressWarnings("deprecation") PullRequestUnapprovedEvent e) {
327-
handleEventAsync(e);
328-
}
329-
330324
@EventListener
331325
public void onEvent(PullRequestUpdatedEvent e) {
332326
handleEventAsync(e);

src/main/resources/admin.vm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@
404404
<label>
405405
<input class="checkbox" type="checkbox" name="triggers[]" value="RESCOPED_TO">RESCOPED_TO, new commits on target branch.</label>
406406
</div>
407+
<div class="checkbox">
408+
<label>
409+
<input class="checkbox" type="checkbox" name="triggers[]" value="REVIEWED">REVIEWED, participant updates status to NEEDS_WORK</label>
410+
</div>
407411
<div class="checkbox">
408412
<label>
409413
<input class="checkbox" type="checkbox" name="triggers[]" value="UNAPPROVED">UNAPPROVED</label>

0 commit comments

Comments
 (0)