From c7065615c3fa241cb59fc6aee352736846b3e505 Mon Sep 17 00:00:00 2001 From: Tomas Bjerre Date: Sat, 1 Aug 2015 09:42:19 +0200 Subject: [PATCH] Reply on Comment, doesn't trigger Commented event #40 * Solved by listening for PullRequestCommentRepliedEvent --- CHANGELOG.md | 3 +++ .../bjurr/prnfs/listener/PrnfsPullRequestEventListener.java | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74a9dbec..fabeedae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ Changelog of Pull Request Notifier for Stash. +## 1.16 +* Triggering also on comment replies if COMMENTED event is checked. + ## 1.15 * Removing RESCOPED event, its confusing when to use it together with _FROM and _TO. RESCOPED was triggered when both _FROM and _TO changed at the exact same time. Now, just check _FROM if you only want to trigger when source branch changes, _TO if only target and both if you want to trigger for both. * Adding logging to make it easier to debug what events are triggered. diff --git a/src/main/java/se/bjurr/prnfs/listener/PrnfsPullRequestEventListener.java b/src/main/java/se/bjurr/prnfs/listener/PrnfsPullRequestEventListener.java index 7e6a8ff2..d017e7e9 100644 --- a/src/main/java/se/bjurr/prnfs/listener/PrnfsPullRequestEventListener.java +++ b/src/main/java/se/bjurr/prnfs/listener/PrnfsPullRequestEventListener.java @@ -21,6 +21,7 @@ import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; import com.atlassian.stash.event.pull.PullRequestApprovedEvent; import com.atlassian.stash.event.pull.PullRequestCommentAddedEvent; +import com.atlassian.stash.event.pull.PullRequestCommentRepliedEvent; import com.atlassian.stash.event.pull.PullRequestDeclinedEvent; import com.atlassian.stash.event.pull.PullRequestEvent; import com.atlassian.stash.event.pull.PullRequestMergedEvent; @@ -71,6 +72,11 @@ public void onEvent(PullRequestCommentAddedEvent e) { handleEvent(e); } + @EventListener + public void onEvent(PullRequestCommentRepliedEvent e) { + handleEvent(e); + } + @EventListener public void onEvent(PullRequestDeclinedEvent e) { handleEvent(e);