Commit 52e70069 authored by Doug Stull's avatar Doug Stull

Add suggest pipeline parameter for ci config path

- we need this to trigger the continuation of the suggest
  pipeline tour on downstream pages.
parent fa0e92fe
......@@ -55,7 +55,8 @@ class MergeRequestWidgetEntity < Grape::Entity
merge_request.source_project,
merge_request.source_branch,
file_name: '.gitlab-ci.yml',
commit_message: s_("CommitMessage|Add %{file_name}") % { file_name: Gitlab::FileDetector::PATTERNS[:gitlab_ci] }
commit_message: s_("CommitMessage|Add %{file_name}") % { file_name: Gitlab::FileDetector::PATTERNS[:gitlab_ci] },
suggest_gitlab_ci_yml: true
)
end
......
......@@ -75,8 +75,9 @@ describe MergeRequestWidgetEntity do
let(:role) { :developer }
it 'has add ci config path' do
expect(subject[:merge_request_add_ci_config_path])
.to eq("/#{resource.project.full_path}/-/new/#{resource.source_branch}?commit_message=Add+.gitlab-ci.yml&file_name=.gitlab-ci.yml")
expected_path = "/#{resource.project.full_path}/-/new/#{resource.source_branch}?commit_message=Add+.gitlab-ci.yml&file_name=.gitlab-ci.yml&suggest_gitlab_ci_yml=true"
expect(subject[:merge_request_add_ci_config_path]).to eq(expected_path)
end
context 'when source project is missing' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment