Skip to content

Commit 7ce29ce

Browse files
committed
Consider @RawEvent for vetoing classes
1 parent bfae58f commit 7ce29ce

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

deployment/src/main/java/io/quarkiverse/githubapp/deployment/VetoUserDefinedEventListeningClassesAnnotationsTransformer.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,25 @@ public void transform(TransformationContext transformationContext) {
2929
return;
3030
}
3131

32+
if (isEventListeningClass(annotations)) {
33+
transformationContext.transform().add(DotNames.VETOED).done();
34+
}
35+
}
36+
37+
public boolean isEventListeningClass(Set<DotName> annotations) {
38+
if (annotations.contains(GitHubAppDotNames.RAW_EVENT)) {
39+
return true;
40+
}
41+
3242
for (DotName eventDefiningAnnotation : eventDefinitionAnnotations) {
3343
if (!annotations.contains(eventDefiningAnnotation)) {
3444
continue;
3545
}
3646

37-
transformationContext.transform().add(DotNames.VETOED).done();
38-
return;
47+
return true;
3948
}
49+
50+
return false;
4051
}
4152

4253
}

0 commit comments

Comments
 (0)