Top level group webhook fail when there's no project in top level group

Summary

Webhook does not check for events in subgroups projects. Thus, when a webhook is created for top level group with no direct projects, the webhook fail with error "Hook execution failed. Ensure the group has a project with commits.". Is this an intended behavior?

Steps to reproduce

  1. Create a Group without any direct project
  2. Add subgroup and project inside the subgroup
  3. Create a webhook for the top level group
  4. Test the webhoook and observe the error code

What is the current bug behavior?

The webhook only looks for events inside the immediate projects of the group.

What is the expected correct behavior?

Webhook looks for events recursively in subgroup project?

Output of checks

This bug happens on GitLab.com; GitLab Enterprise Edition 12.9.0-pre db94ef12