"test failed" message when adding Mattermost webhook to project with no repository

Summary

"test failed" message appears when adding Mattermost webhook to project with no repository however webhook is working fine

Steps to reproduce

  1. Create new project with repo turned off
  2. Try adding Mattermost webhook and see "test failed" message... click save anyway button
  3. Create an issue and see that webhook fires

What is the current bug behavior?

Misleading "test failed" message occurs

What is the expected correct behavior?

Webhook should save since it's actually working correctly

Relevant logs and/or screenshots

image

Possible fixes

It appears that the test might always be testing a push trigger even if that is not one of the ones the user has selected to enable. It should test a trigger that the user has enabled and even if that fails it should display a more meaningful failure message (such as test failed due to empty repo).

Assignee Loading
Time tracking Loading