diff --git a/spring-cloud-config-monitor/src/main/java/org/springframework/cloud/config/monitor/GitlabPropertyPathNotificationExtractor.java b/spring-cloud-config-monitor/src/main/java/org/springframework/cloud/config/monitor/GitlabPropertyPathNotificationExtractor.java index b9796776..bdf35ab1 100644 --- a/spring-cloud-config-monitor/src/main/java/org/springframework/cloud/config/monitor/GitlabPropertyPathNotificationExtractor.java +++ b/spring-cloud-config-monitor/src/main/java/org/springframework/cloud/config/monitor/GitlabPropertyPathNotificationExtractor.java @@ -34,7 +34,7 @@ public class GitlabPropertyPathNotificationExtractor @Override public PropertyPathNotification extract(MultiValueMap headers, Map request) { - if ("Push Event".equals(headers.getFirst("X-Gitlab-Event"))) { + if ("Push Hook".equals(headers.getFirst("X-Gitlab-Event"))) { if (request.get("commits") instanceof Collection) { // Gitlab doesn't tell us the files that changed so this is a broadcast to // all apps diff --git a/spring-cloud-config-monitor/src/test/java/org/springframework/cloud/config/monitor/CompositePropertyPathNotificationExtractorTests.java b/spring-cloud-config-monitor/src/test/java/org/springframework/cloud/config/monitor/CompositePropertyPathNotificationExtractorTests.java index 99c84f92..4734c6d6 100644 --- a/spring-cloud-config-monitor/src/test/java/org/springframework/cloud/config/monitor/CompositePropertyPathNotificationExtractorTests.java +++ b/spring-cloud-config-monitor/src/test/java/org/springframework/cloud/config/monitor/CompositePropertyPathNotificationExtractorTests.java @@ -61,7 +61,7 @@ public class CompositePropertyPathNotificationExtractorTests { new ClassPathResource("gitlab.json").getInputStream(), new TypeReference>() { }); - this.headers.set("X-Gitlab-Event", "Push Event"); + this.headers.set("X-Gitlab-Event", "Push Hook"); PropertyPathNotification extracted = this.extractor.extract(this.headers, value); assertNotNull(extracted); assertEquals("application.yml", extracted.getPaths()[0]); diff --git a/spring-cloud-config-monitor/src/test/java/org/springframework/cloud/config/monitor/GitlabPropertyPathNotificationExtractorTests.java b/spring-cloud-config-monitor/src/test/java/org/springframework/cloud/config/monitor/GitlabPropertyPathNotificationExtractorTests.java index 38c8f72a..dcec2a46 100644 --- a/spring-cloud-config-monitor/src/test/java/org/springframework/cloud/config/monitor/GitlabPropertyPathNotificationExtractorTests.java +++ b/spring-cloud-config-monitor/src/test/java/org/springframework/cloud/config/monitor/GitlabPropertyPathNotificationExtractorTests.java @@ -46,7 +46,7 @@ public class GitlabPropertyPathNotificationExtractorTests { new ClassPathResource("gitlab.json").getInputStream(), new TypeReference>() { }); - this.headers.set("X-Gitlab-Event", "Push Event"); + this.headers.set("X-Gitlab-Event", "Push Hook"); PropertyPathNotification extracted = this.extractor.extract(this.headers, value); assertNotNull(extracted); assertEquals("application.yml", extracted.getPaths()[0]); @@ -59,7 +59,7 @@ public class GitlabPropertyPathNotificationExtractorTests { new ClassPathResource("gitlab.json").getInputStream(), new TypeReference>() { }); - this.headers.set("X-Gitlab-Event", "Issue Event"); + this.headers.set("X-Gitlab-Event", "Issue Hook"); PropertyPathNotification extracted = this.extractor.extract(this.headers, value); assertNull(extracted); }