Global custom notification configuration is not respected

Summary

The modification of the custom global settings is not respected. For instance, selecting custom on the global settings still sends email on successful pipeline, even though it is disable.

Tested it by using gitlab.com

Steps to reproduce

  1. Go to Notifications tab on Profile.
  2. Set the Global notification level to Custom.
  3. Disable Successful pipeline.
  4. Have existing repository notification level to Global.
  5. Trigger a pipeline (I tested by doing a push and auto building it).
  6. Receive an email on successful pipeline.

Expected behavior

On the last step I did not expect the email.

Actual behavior

The email is sent despite being disabled.