"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
- Create new project with repo turned off
- Try adding Mattermost webhook and see "test failed" message... click save anyway button
- 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
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).
