Project registration via system_hook gets disabled by GitLab

App version

The currently running version of dependabot is 0.34.0. GitLab version is 15.8.1-ee.

Execution mode

Deployed via Helm Chart.

Expected outcome

We are using system_hook for project registration, as document here. But there seems to be no option to only configure it for the 4 required event types (- project_create, project_destroy, project_rename, project_transfer). But the webhook will be disabled by GitLab every few days, as it is getting !=200 HTTP codes from dependabot.

It is working for a few days, but then get's disabled due to the following error. The error is {"status":400,"error":"Unsupported event or missing parameter 'event_name'"}. It can easily be reproduced by using the test feature of GitLab, for example with the repository update hook. I see no way to trigger only one of the earlier mentioned hooks.

The error is coming from this controller I assume (https://gitlab.com/dependabot-gitlab/dependabot/-/blob/main/app/controllers/api/registration_controller.rb#L44). I've never done ruby so I assume this (https://gitlab.com/dependabot-gitlab/dependabot/-/blob/main/app/controllers/api/registration_controller.rb#L28) is check for the 4 earlier mentioned events and otherwise is returning the error in line 44?

The example requests looks like this:

{
  "event_name": "repository_update",
  "user_id": 10,
  "user_name": "john.doe",
  "user_email": "[REDACTED]",
  "user_avatar": "http://example.com/avatar/user.png",
  "project_id": 40,
  "changes": [
    {
      "before": "8205ea8d81ce0c6b90fbe8280d118cc9fdad6130",
      "after": "4045ea7a3df38697b3730a20fb73c8bed8a3e69e",
      "ref": "refs/heads/master"
    }
  ],
  "refs": [
    "refs/heads/master"
  ]
}

Expected outcome

Project registration via system_hook should work without getting disabled every few days.

Thanks for you work on this project!