Slack notifications integration fails setup in projects without a repository

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

The Slack notifications service integration is unable to be configured for projects that do not have a repository.

Steps to reproduce

  1. Create a project without initializing a README.
  2. Navigate to that project's Settings -> Integrations area and select Slack notifications.
  3. Input the URL generated by your Slack instance into the integration settings in your project.
  4. Select Issue and Confidential issue as the events.
  5. Save the settings.
  6. Observe an error.

Note: this happens both when Repository is enabled and disabled in Settings -> General -> Visibility, project features, permissions on the project.

Example Project

What is the current bug behavior?

The Slack notifications integration cannot be used on projects without a repository.

What is the expected correct behavior?

The Slack notifications integration should be able to be used on projects without a repository as some users will want to use the project just as an issue tracker.

Relevant logs and/or screenshots

Screenshot_2020-03-04_Slack_notifications___Services___Settings___Tristan_Williams_148875

Output of checks

This bug happens on GitLab.com: 12.9.0-pre 7d593d238f4

ZD: https://gitlab.zendesk.com/agent/tickets/148875 (GitLab Internal)

Edited by 🤖 GitLab Bot 🤖