Be more permissive about GHEvent parsing

This commit is contained in:
Guillaume Smet
2021-04-14 16:28:46 +02:00
parent 696dd90b23
commit 0ce78016cc
3 changed files with 7 additions and 2 deletions

View File

@@ -188,7 +188,7 @@ public class GHWorkflowRun extends GHObject {
* @return type of event
*/
public GHEvent getEvent() {
return Enum.valueOf(GHEvent.class, event.toUpperCase(Locale.ROOT));
return EnumUtils.getNullableEnumOrDefault(GHEvent.class, event, GHEvent.UNKNOWN);
}
/**