Don't show new merge request message for new wiki branches
Summary
When a new branch is pushed to the wiki repository, the message To create a merge request for test, visit: ...
is shown (obviously with a wrong url because is pointing to the project).
We should detect the type of repository the branch is created in and, based on that, show the message or not.
Steps to reproduce
- Clone a wiki repository
- Create and push a branch
What is the current bug behavior?
The message to create a new merge request is created for wiki repositories.
What is the expected correct behavior?
The message shouldn't be sent for repositories other than project repositories.
Possible fixes
There are several possible fixes but the most straightforward is to update https://gitlab.com/gitlab-org/gitlab/blob/master/lib/api/internal/base.rb#L212 and add:
....
response.add_merge_request_urls(merge_request_urls) if repo_type.project?
....
/cc @nick.thomas
Edited by Francisco Javier López (ex-Gitlab)