Commit 4f961f94 authored by James Lopez's avatar James Lopez

Add extra MWBS found after the merge

parent 7584b51c
...@@ -489,7 +489,7 @@ Parameters: ...@@ -489,7 +489,7 @@ Parameters:
| `merge_request_id` | integer | yes | The ID of the merge request | | `merge_request_id` | integer | yes | The ID of the merge request |
| `merge_commit_message` | string | no | Custom merge commit message | | `merge_commit_message` | string | no | Custom merge commit message |
| `should_remove_source_branch` | boolean | no | Remove the source branch after merge | | `should_remove_source_branch` | boolean | no | Remove the source branch after merge |
| `merge_when_build_succeeds` | boolean | no | Merge when build succeeds, rather than immediately | | `merge_when_pipeline_succeeds` | boolean | no | Merge when pipeline succeeds, rather than immediately |
| `sha` | string | no | If present, then this SHA must match the HEAD of the source branch, otherwise the merge will fail | | `sha` | string | no | If present, then this SHA must match the HEAD of the source branch, otherwise the merge will fail |
| `squash` | boolean | no | Squash the merge request into a single commit | | `squash` | boolean | no | Squash the merge request into a single commit |
......
...@@ -32,7 +32,7 @@ Create a user or choose an existing user that Jenkins will use to interact ...@@ -32,7 +32,7 @@ Create a user or choose an existing user that Jenkins will use to interact
through the GitLab API. This user will need to be a global Admin or added through the GitLab API. This user will need to be a global Admin or added
as a member to each Group/Project. Developer permission is required for reporting as a member to each Group/Project. Developer permission is required for reporting
build status. This is because a successful build status can trigger a merge build status. This is because a successful build status can trigger a merge
when 'Merge when build succeeds' feature is used. Some features of the GitLab when 'Merge when pipeline succeeds' feature is used. Some features of the GitLab
Plugin may require additional privileges. For example, there is an option to Plugin may require additional privileges. For example, there is an option to
accept a merge request if the build is successful. Using this feature would accept a merge request if the build is successful. Using this feature would
require developer, master or owner-level permission. require developer, master or owner-level permission.
......
...@@ -179,7 +179,7 @@ module API ...@@ -179,7 +179,7 @@ module API
optional :should_remove_source_branch, type: Boolean, optional :should_remove_source_branch, type: Boolean,
desc: 'When true, the source branch will be deleted if possible' desc: 'When true, the source branch will be deleted if possible'
optional :merge_when_build_succeeds, type: Boolean, optional :merge_when_build_succeeds, type: Boolean,
desc: 'When true, this merge request will be merged when the build succeeds' desc: 'When true, this merge request will be merged when the pipeline succeeds'
optional :sha, type: String, desc: 'When present, must have the HEAD SHA of the source branch' optional :sha, type: String, desc: 'When present, must have the HEAD SHA of the source branch'
optional :squash, type: Boolean, desc: 'When true, the commits will be squashed into a single commit on merge' optional :squash, type: Boolean, desc: 'When true, the commits will be squashed into a single commit on merge'
end end
...@@ -220,7 +220,7 @@ module API ...@@ -220,7 +220,7 @@ module API
present merge_request, with: ::API::V3::Entities::MergeRequest, current_user: current_user, project: user_project present merge_request, with: ::API::V3::Entities::MergeRequest, current_user: current_user, project: user_project
end end
desc 'Cancel merge if "Merge When Build succeeds" is enabled' do desc 'Cancel merge if "Merge When Pipeline succeeds" is enabled' do
success ::API::V3::Entities::MergeRequest success ::API::V3::Entities::MergeRequest
end end
post "#{path}/cancel_merge_when_build_succeeds" do post "#{path}/cancel_merge_when_build_succeeds" do
......
...@@ -556,7 +556,7 @@ describe API::Projects, api: true do ...@@ -556,7 +556,7 @@ describe API::Projects, api: true do
expect(json_response['shared_with_groups'][0]['group_id']).to eq(group.id) expect(json_response['shared_with_groups'][0]['group_id']).to eq(group.id)
expect(json_response['shared_with_groups'][0]['group_name']).to eq(group.name) expect(json_response['shared_with_groups'][0]['group_name']).to eq(group.name)
expect(json_response['shared_with_groups'][0]['group_access_level']).to eq(link.group_access) expect(json_response['shared_with_groups'][0]['group_access_level']).to eq(link.group_access)
expect(json_response['only_allow_merge_if_build_succeeds']).to eq(project.only_allow_merge_if_build_succeeds) expect(json_response['only_allow_merge_if_pipeline_succeeds']).to eq(project.only_allow_merge_if_pipeline_succeeds)
expect(json_response['only_allow_merge_if_all_discussions_are_resolved']).to eq(project.only_allow_merge_if_all_discussions_are_resolved) expect(json_response['only_allow_merge_if_all_discussions_are_resolved']).to eq(project.only_allow_merge_if_all_discussions_are_resolved)
expect(json_response['repository_storage']).to eq(project.repository_storage) expect(json_response['repository_storage']).to eq(project.repository_storage)
end end
......
...@@ -221,7 +221,7 @@ describe CreateDeploymentService, services: true do ...@@ -221,7 +221,7 @@ describe CreateDeploymentService, services: true do
{ environment: { name: 'production', url: 'http://gitlab.com' } } { environment: { name: 'production', url: 'http://gitlab.com' } }
end end
context 'when build succeeds' do context 'when pipeline succeeds' do
it_behaves_like 'does create environment and deployment' do it_behaves_like 'does create environment and deployment' do
let(:deployable) { build } let(:deployable) { build }
......
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