Skip to content

Commit 325a0d4

Browse files
authored
[JENKINS-7614] More processors found that handle the incoming Bitbucket hook on PULL_REQUEST_UPDATED (#1118)
Remove wrong events processed by PluginPushWebhookProcessor
1 parent a187316 commit 325a0d4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/impl/webhook/plugin/PluginPushWebhookProcessor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ public class PluginPushWebhookProcessor extends AbstractWebhookProcessor {
4949

5050
private static final Logger logger = Logger.getLogger(PluginPushWebhookProcessor.class.getName());
5151
private static final List<String> supportedEvents = List.of(
52-
HookEventType.PUSH.getKey(),
53-
HookEventType.PULL_REQUEST_UPDATED.getKey());
52+
HookEventType.PUSH.getKey());
5453

5554
@Override
5655
public boolean canHandle(Map<String, String> headers, MultiValuedMap<String, String> parameters) {

src/test/java/com/cloudbees/jenkins/plugins/bitbucket/impl/webhook/plugin/PluginPushWebhookProcessorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void test_canHandle_only_pass_specific_native_hook() throws Exception {
107107
assertThat(sut.canHandle(headers, parameters)).isTrue();
108108

109109
headers.put("X-Event-Key", "pullrequest:updated");
110-
assertThat(sut.canHandle(headers, parameters)).isTrue();
110+
assertThat(sut.canHandle(headers, parameters)).isFalse();
111111
}
112112

113113
@Test

0 commit comments

Comments
 (0)