HookEvent.fromJson constructor
Implementation
factory HookEvent.fromJson(String? event, Map<String, dynamic>? json) {
if (event == 'pull_request') {
return PullRequestEvent.fromJson(json!);
} else if (event == 'issues') {
return IssueEvent.fromJson(json!);
} else if (event == 'issue_comment') {
return IssueCommentEvent.fromJson(json!);
} else if (event == 'repository') {
return RepositoryEvent.fromJson(json!);
}
return UnknownHookEvent(event, json);
}