Skip to content

Commit

Permalink
Merge pull request #726 from gsmet/fix-vetoed
Browse files Browse the repository at this point in the history
Consider @RawEvent for vetoing classes
  • Loading branch information
gsmet authored Mar 4, 2025
2 parents bfae58f + 7ce29ce commit 60ae9ba
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,25 @@ public void transform(TransformationContext transformationContext) {
return;
}

if (isEventListeningClass(annotations)) {
transformationContext.transform().add(DotNames.VETOED).done();
}
}

public boolean isEventListeningClass(Set<DotName> annotations) {
if (annotations.contains(GitHubAppDotNames.RAW_EVENT)) {
return true;
}

for (DotName eventDefiningAnnotation : eventDefinitionAnnotations) {
if (!annotations.contains(eventDefiningAnnotation)) {
continue;
}

transformationContext.transform().add(DotNames.VETOED).done();
return;
return true;
}

return false;
}

}

0 comments on commit 60ae9ba

Please sign in to comment.