Make all SystemHook trigger events configurable
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
For system hooks, certain events are always triggered and can't be configured in the admin area.
Example: The :failed_login
event triggered from https://gitlab.com/gitlab-org/gitlab/blob/9ed55b6da2451b66739482c2a01996ad66c51b36/lib/gitlab/auth/blocked_user_tracker.rb#L17
Proposal
- Find all event names that are used to trigger system hooks.
- Assign them to one of the existing
*_events
columns onweb_hooks
, or add new ones. - Refactor the existing code to only trigger these events if the corresponding
*_events
column is enabled. - Make sure these events are correctly exposed on the admin form and API.
- Update docs.
Related issues
In gitlab-com/gl-infra/production#5501 (closed) we had to use a workaround to disable a misbehaving system hook on gitlab.com. With this issue we could instead just disable all trigger events.
Edited by 🤖 GitLab Bot 🤖