Commit a03565ac authored by Jacques Erasmus's avatar Jacques Erasmus

Merge branch '342916-merge_train_when_pipeline_succeeds_docs_path' into 'master'

Migrate merge train when docs path

See merge request gitlab-org/gitlab!73278
parents f24e45c9 31bad576
......@@ -590,13 +590,7 @@ export default {
:class="{ 'gl-w-full gl-order-n1 gl-mb-5': glFeatures.restructuredMrWidget }"
class="gl-display-flex gl-align-items-center gl-flex-wrap"
>
<merge-train-helper-icon
v-if="shouldRenderMergeTrainHelperIcon"
:merge-train-when-pipeline-succeeds-docs-path="
mr.mergeTrainWhenPipelineSucceedsDocsPath
"
class="gl-mx-3"
/>
<merge-train-helper-icon v-if="shouldRenderMergeTrainHelperIcon" class="gl-mx-3" />
<gl-form-checkbox
v-if="canRemoveSourceBranch"
......
......@@ -59,7 +59,6 @@ export default class MergeRequestStore {
this.sourceBranch = data.source_branch;
this.sourceBranchProtected = data.source_branch_protected;
this.conflictsDocsPath = data.conflicts_docs_path;
this.mergeTrainWhenPipelineSucceedsDocsPath = data.merge_train_when_pipeline_succeeds_docs_path;
this.commitMessage = data.default_merge_commit_message;
this.shortMergeCommitSha = data.short_merged_commit_sha;
this.mergeCommitSha = data.merged_commit_sha;
......
<script>
import { GlIcon, GlLink, GlPopover } from '@gitlab/ui';
import { helpPagePath } from '~/helpers/help_page_helper';
import { s__ } from '~/locale';
export default {
......@@ -9,13 +10,6 @@ export default {
GlLink,
GlPopover,
},
props: {
mergeTrainWhenPipelineSucceedsDocsPath: {
type: String,
required: true,
},
},
i18n: {
popoverTitle: s__('mrWidget|What is a merge train?'),
popoverContent: s__(
......@@ -28,6 +22,13 @@ export default {
target: 'merge-train-help',
container: 'merge-train-help-container',
},
computed: {
mergeTrainWhenPipelineSucceedsDocsPath() {
return helpPagePath('ci/pipelines/merge_trains.md', {
anchor: 'add-a-merge-request-to-a-merge-train',
});
},
},
};
</script>
......
......@@ -28,10 +28,6 @@ module EE
end
end
def merge_train_when_pipeline_succeeds_docs_path
help_page_path('ci/pipelines/merge_trains.md', anchor: 'add-a-merge-request-to-a-merge-train')
end
def merge_immediately_docs_path
help_page_path('ci/pipelines/merge_trains.md', anchor: 'immediately-merge-a-merge-request-with-a-merge-train')
end
......
......@@ -5,10 +5,6 @@ module EE
extend ActiveSupport::Concern
prepended do
expose :merge_train_when_pipeline_succeeds_docs_path do |merge_request|
presenter(merge_request).merge_train_when_pipeline_succeeds_docs_path
end
expose :policy_violation do |merge_request|
presenter(merge_request).has_denied_policies?
end
......
......@@ -97,10 +97,6 @@ module EE
presenter(merge_request).api_approval_settings_path
end
expose :merge_train_when_pipeline_succeeds_docs_path do |merge_request|
presenter(merge_request).merge_train_when_pipeline_succeeds_docs_path
end
expose :merge_immediately_docs_path do |merge_request|
presenter(merge_request).merge_immediately_docs_path
end
......
......@@ -4,7 +4,6 @@
{ "$ref": "../../../../../../spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json" },
{
"properties" : {
"merge_train_when_pipeline_succeeds_docs_path": { "type": "string" },
"policy_violation": { "type": "boolean" }
}
}
......
......@@ -5,18 +5,14 @@ import MergeTrainHelperIcon from 'ee/vue_merge_request_widget/components/merge_t
describe('MergeTrainHelperIcon', () => {
let wrapper;
const helpLink = 'path/to/help';
const helpLink = '/help/ci/pipelines/merge_trains.md#add-a-merge-request-to-a-merge-train';
const findIcon = () => wrapper.findComponent(GlIcon);
const findPopover = () => wrapper.findComponent(GlPopover);
const findLink = () => wrapper.findComponent(GlLink);
const createComponent = () => {
wrapper = shallowMount(MergeTrainHelperIcon, {
propsData: {
mergeTrainWhenPipelineSucceedsDocsPath: helpLink,
},
});
wrapper = shallowMount(MergeTrainHelperIcon);
};
beforeEach(() => {
......
......@@ -56,7 +56,6 @@ describe('ReadyToMerge', () => {
preferredAutoMergeStrategy: MWPS_MERGE_STRATEGY,
availableAutoMergeStrategies: [MWPS_MERGE_STRATEGY],
mergeImmediatelyDocsPath: 'path/to/merge/immediately/docs',
mergeTrainWhenPipelineSucceedsDocsPath: '/merge-train/docs',
mergeTrainsCount: 0,
};
......
......@@ -11,10 +11,6 @@ RSpec.describe MergeRequestPollCachedWidgetEntity do
subject { described_class.new(resource, request: request).as_json }
it 'includes docs path for merge trains' do
is_expected.to include(:merge_train_when_pipeline_succeeds_docs_path)
end
it 'includes policy violation status' do
is_expected.to include(:policy_violation)
end
......
......@@ -271,8 +271,6 @@ export default {
mr_troubleshooting_docs_path: 'help',
ci_troubleshooting_docs_path: 'help2',
merge_request_pipelines_docs_path: '/help/ci/pipelines/merge_request_pipelines.md',
merge_train_when_pipeline_succeeds_docs_path:
'/help/ci/pipelines/merge_trains.md#startadd-to-merge-train-when-pipeline-succeeds',
squash: true,
visual_review_app_available: true,
merge_trains_enabled: true,
......
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