Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
31bad576
Commit
31bad576
authored
Nov 19, 2021
by
David O'Regan
Committed by
Jacques Erasmus
Nov 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate merge train when docs path
parent
acaa798d
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
11 additions
and
41 deletions
+11
-41
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
...merge_request_widget/components/states/ready_to_merge.vue
+1
-7
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
...cripts/vue_merge_request_widget/stores/mr_widget_store.js
+0
-1
ee/app/assets/javascripts/vue_merge_request_widget/components/merge_train_helper_icon.vue
...rge_request_widget/components/merge_train_helper_icon.vue
+8
-7
ee/app/presenters/ee/merge_request_presenter.rb
ee/app/presenters/ee/merge_request_presenter.rb
+0
-4
ee/app/serializers/ee/merge_request_poll_cached_widget_entity.rb
...serializers/ee/merge_request_poll_cached_widget_entity.rb
+0
-4
ee/app/serializers/ee/merge_request_widget_entity.rb
ee/app/serializers/ee/merge_request_widget_entity.rb
+0
-4
ee/spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json
...pi/schemas/entities/merge_request_poll_cached_widget.json
+0
-1
ee/spec/frontend/vue_mr_widget/components/merge_train_helper_icon_spec.js
.../vue_mr_widget/components/merge_train_helper_icon_spec.js
+2
-6
ee/spec/frontend/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
...widget/components/states/mr_widget_ready_to_merge_spec.js
+0
-1
ee/spec/serializers/ee/merge_request_poll_cached_widget_entity_spec.rb
...lizers/ee/merge_request_poll_cached_widget_entity_spec.rb
+0
-4
spec/frontend/vue_mr_widget/mock_data.js
spec/frontend/vue_mr_widget/mock_data.js
+0
-2
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
View file @
31bad576
...
@@ -590,13 +590,7 @@ export default {
...
@@ -590,13 +590,7 @@ export default {
:class=
"{ 'gl-w-full gl-order-n1 gl-mb-5': glFeatures.restructuredMrWidget }"
:class=
"{ 'gl-w-full gl-order-n1 gl-mb-5': glFeatures.restructuredMrWidget }"
class=
"gl-display-flex gl-align-items-center gl-flex-wrap"
class=
"gl-display-flex gl-align-items-center gl-flex-wrap"
>
>
<merge-train-helper-icon
<merge-train-helper-icon
v-if=
"shouldRenderMergeTrainHelperIcon"
class=
"gl-mx-3"
/>
v-if=
"shouldRenderMergeTrainHelperIcon"
:merge-train-when-pipeline-succeeds-docs-path=
"
mr.mergeTrainWhenPipelineSucceedsDocsPath
"
class=
"gl-mx-3"
/>
<gl-form-checkbox
<gl-form-checkbox
v-if=
"canRemoveSourceBranch"
v-if=
"canRemoveSourceBranch"
...
...
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
View file @
31bad576
...
@@ -59,7 +59,6 @@ export default class MergeRequestStore {
...
@@ -59,7 +59,6 @@ export default class MergeRequestStore {
this
.
sourceBranch
=
data
.
source_branch
;
this
.
sourceBranch
=
data
.
source_branch
;
this
.
sourceBranchProtected
=
data
.
source_branch_protected
;
this
.
sourceBranchProtected
=
data
.
source_branch_protected
;
this
.
conflictsDocsPath
=
data
.
conflicts_docs_path
;
this
.
conflictsDocsPath
=
data
.
conflicts_docs_path
;
this
.
mergeTrainWhenPipelineSucceedsDocsPath
=
data
.
merge_train_when_pipeline_succeeds_docs_path
;
this
.
commitMessage
=
data
.
default_merge_commit_message
;
this
.
commitMessage
=
data
.
default_merge_commit_message
;
this
.
shortMergeCommitSha
=
data
.
short_merged_commit_sha
;
this
.
shortMergeCommitSha
=
data
.
short_merged_commit_sha
;
this
.
mergeCommitSha
=
data
.
merged_commit_sha
;
this
.
mergeCommitSha
=
data
.
merged_commit_sha
;
...
...
ee/app/assets/javascripts/vue_merge_request_widget/components/merge_train_helper_icon.vue
View file @
31bad576
<
script
>
<
script
>
import
{
GlIcon
,
GlLink
,
GlPopover
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
,
GlLink
,
GlPopover
}
from
'
@gitlab/ui
'
;
import
{
helpPagePath
}
from
'
~/helpers/help_page_helper
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
export
default
{
export
default
{
...
@@ -9,13 +10,6 @@ export default {
...
@@ -9,13 +10,6 @@ export default {
GlLink
,
GlLink
,
GlPopover
,
GlPopover
,
},
},
props
:
{
mergeTrainWhenPipelineSucceedsDocsPath
:
{
type
:
String
,
required
:
true
,
},
},
i18n
:
{
i18n
:
{
popoverTitle
:
s__
(
'
mrWidget|What is a merge train?
'
),
popoverTitle
:
s__
(
'
mrWidget|What is a merge train?
'
),
popoverContent
:
s__
(
popoverContent
:
s__
(
...
@@ -28,6 +22,13 @@ export default {
...
@@ -28,6 +22,13 @@ export default {
target
:
'
merge-train-help
'
,
target
:
'
merge-train-help
'
,
container
:
'
merge-train-help-container
'
,
container
:
'
merge-train-help-container
'
,
},
},
computed
:
{
mergeTrainWhenPipelineSucceedsDocsPath
()
{
return
helpPagePath
(
'
ci/pipelines/merge_trains.md
'
,
{
anchor
:
'
add-a-merge-request-to-a-merge-train
'
,
});
},
},
};
};
</
script
>
</
script
>
...
...
ee/app/presenters/ee/merge_request_presenter.rb
View file @
31bad576
...
@@ -28,10 +28,6 @@ module EE
...
@@ -28,10 +28,6 @@ module EE
end
end
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
def
merge_immediately_docs_path
help_page_path
(
'ci/pipelines/merge_trains.md'
,
anchor:
'immediately-merge-a-merge-request-with-a-merge-train'
)
help_page_path
(
'ci/pipelines/merge_trains.md'
,
anchor:
'immediately-merge-a-merge-request-with-a-merge-train'
)
end
end
...
...
ee/app/serializers/ee/merge_request_poll_cached_widget_entity.rb
View file @
31bad576
...
@@ -5,10 +5,6 @@ module EE
...
@@ -5,10 +5,6 @@ module EE
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
prepended
do
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
|
expose
:policy_violation
do
|
merge_request
|
presenter
(
merge_request
).
has_denied_policies?
presenter
(
merge_request
).
has_denied_policies?
end
end
...
...
ee/app/serializers/ee/merge_request_widget_entity.rb
View file @
31bad576
...
@@ -97,10 +97,6 @@ module EE
...
@@ -97,10 +97,6 @@ module EE
presenter
(
merge_request
).
api_approval_settings_path
presenter
(
merge_request
).
api_approval_settings_path
end
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
|
expose
:merge_immediately_docs_path
do
|
merge_request
|
presenter
(
merge_request
).
merge_immediately_docs_path
presenter
(
merge_request
).
merge_immediately_docs_path
end
end
...
...
ee/spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json
View file @
31bad576
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
{
"$ref"
:
"../../../../../../spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json"
},
{
"$ref"
:
"../../../../../../spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json"
},
{
{
"properties"
:
{
"properties"
:
{
"merge_train_when_pipeline_succeeds_docs_path"
:
{
"type"
:
"string"
},
"policy_violation"
:
{
"type"
:
"boolean"
}
"policy_violation"
:
{
"type"
:
"boolean"
}
}
}
}
}
...
...
ee/spec/frontend/vue_mr_widget/components/merge_train_helper_icon_spec.js
View file @
31bad576
...
@@ -5,18 +5,14 @@ import MergeTrainHelperIcon from 'ee/vue_merge_request_widget/components/merge_t
...
@@ -5,18 +5,14 @@ import MergeTrainHelperIcon from 'ee/vue_merge_request_widget/components/merge_t
describe
(
'
MergeTrainHelperIcon
'
,
()
=>
{
describe
(
'
MergeTrainHelperIcon
'
,
()
=>
{
let
wrapper
;
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
findIcon
=
()
=>
wrapper
.
findComponent
(
GlIcon
);
const
findPopover
=
()
=>
wrapper
.
findComponent
(
GlPopover
);
const
findPopover
=
()
=>
wrapper
.
findComponent
(
GlPopover
);
const
findLink
=
()
=>
wrapper
.
findComponent
(
GlLink
);
const
findLink
=
()
=>
wrapper
.
findComponent
(
GlLink
);
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
wrapper
=
shallowMount
(
MergeTrainHelperIcon
,
{
wrapper
=
shallowMount
(
MergeTrainHelperIcon
);
propsData
:
{
mergeTrainWhenPipelineSucceedsDocsPath
:
helpLink
,
},
});
};
};
beforeEach
(()
=>
{
beforeEach
(()
=>
{
...
...
ee/spec/frontend/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
View file @
31bad576
...
@@ -56,7 +56,6 @@ describe('ReadyToMerge', () => {
...
@@ -56,7 +56,6 @@ describe('ReadyToMerge', () => {
preferredAutoMergeStrategy
:
MWPS_MERGE_STRATEGY
,
preferredAutoMergeStrategy
:
MWPS_MERGE_STRATEGY
,
availableAutoMergeStrategies
:
[
MWPS_MERGE_STRATEGY
],
availableAutoMergeStrategies
:
[
MWPS_MERGE_STRATEGY
],
mergeImmediatelyDocsPath
:
'
path/to/merge/immediately/docs
'
,
mergeImmediatelyDocsPath
:
'
path/to/merge/immediately/docs
'
,
mergeTrainWhenPipelineSucceedsDocsPath
:
'
/merge-train/docs
'
,
mergeTrainsCount
:
0
,
mergeTrainsCount
:
0
,
};
};
...
...
ee/spec/serializers/ee/merge_request_poll_cached_widget_entity_spec.rb
View file @
31bad576
...
@@ -11,10 +11,6 @@ RSpec.describe MergeRequestPollCachedWidgetEntity do
...
@@ -11,10 +11,6 @@ RSpec.describe MergeRequestPollCachedWidgetEntity do
subject
{
described_class
.
new
(
resource
,
request:
request
).
as_json
}
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
it
'includes policy violation status'
do
is_expected
.
to
include
(
:policy_violation
)
is_expected
.
to
include
(
:policy_violation
)
end
end
...
...
spec/frontend/vue_mr_widget/mock_data.js
View file @
31bad576
...
@@ -271,8 +271,6 @@ export default {
...
@@ -271,8 +271,6 @@ export default {
mr_troubleshooting_docs_path
:
'
help
'
,
mr_troubleshooting_docs_path
:
'
help
'
,
ci_troubleshooting_docs_path
:
'
help2
'
,
ci_troubleshooting_docs_path
:
'
help2
'
,
merge_request_pipelines_docs_path
:
'
/help/ci/pipelines/merge_request_pipelines.md
'
,
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
,
squash
:
true
,
visual_review_app_available
:
true
,
visual_review_app_available
:
true
,
merge_trains_enabled
:
true
,
merge_trains_enabled
:
true
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment