Commit 5e6aa649 authored by Jarka Košanová's avatar Jarka Košanová

Merge branch 'add-suggest-pipeline-param' into 'master'

Add suggest pipeline parameter for ci config path

See merge request gitlab-org/gitlab!25535
parents 3d227998 52e70069
......@@ -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